Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
Move Tabs Around
<?php
add_action( 'widgets_init' , 'custom_remove_tabs' , 10 );
function custom_remove_tabs() {
global $woocommerce_product_enquiry_form,$WooCommerce_Video_Product_Tab,$WoocommerceCustomProductTabsLite;
remove_action('woocommerce_product_tabs', array( &$WooCommerce_Video_Product_Tab,'video_product_tabs'), 25);
remove_action('woocommerce_product_tab_panels', array( &$WooCommerce_Video_Product_Tab,'video_product_tabs_panel'), 25);
remove_action('woocommerce_product_tabs', 'video_product_tabs', 25);
remove_action('woocommerce_product_tab_panels', 'video_product_tabs_panel', 25);
remove_action('woocommerce_product_tabs', array( &$woocommerce_product_enquiry_form,'product_enquiry_tab' ), 25);
remove_action('woocommerce_product_tab_panels', array( &$woocommerce_product_enquiry_form,'product_enquiry_tabs_panel' ), 25);
remove_action('woocommerce_product_tabs', array( &$WoocommerceCustomProductTabsLite,'custom_product_tabs'), 25);
remove_action('woocommerce_product_tab_panels', array( &$WoocommerceCustomProductTabsLite,'custom_product_tabs_panel'), 25);
remove_action( 'woocommerce_product_tabs', 'woocommerce_product_description_tab', 10 );
remove_action( 'woocommerce_product_tabs', 'woocommerce_product_attributes_tab', 20 );
remove_action( 'woocommerce_product_tabs', 'woocommerce_product_reviews_tab', 30 );
remove_action( 'woocommerce_product_tab_panels', 'woocommerce_product_description_panel', 10 );
remove_action( 'woocommerce_product_tab_panels', 'woocommerce_product_attributes_panel', 20 );
remove_action( 'woocommerce_product_tab_panels', 'woocommerce_product_reviews_panel', 30 );
}
add_action( 'widgets_init' , 'custom_add_tabs' , 11 );
function custom_add_tabs() {
global $woocommerce_product_enquiry_form,$WooCommerce_Video_Product_Tab,$WoocommerceCustomProductTabsLite;
add_action( 'woocommerce_product_tabs', 'woocommerce_product_description_tab', 10 );
add_action( 'woocommerce_product_tab_panels', 'woocommerce_product_description_panel', 10 );
add_action( 'woocommerce_product_tabs', array( &$WooCommerce_Video_Product_Tab,'video_product_tabs'), 20 );
add_action( 'woocommerce_product_tab_panels', array( &$WooCommerce_Video_Product_Tab,'video_product_tabs_panel'), 20 );
add_action( 'woocommerce_product_tabs', array( &$WoocommerceCustomProductTabsLite,'custom_product_tabs'), 90 );
add_action( 'woocommerce_product_tab_panels', array( &$WoocommerceCustomProductTabsLite,'custom_product_tabs_panel'), 90 );
add_action( 'woocommerce_product_tab_panels', 'woocommerce_product_reviews_panel', 40 );
add_action( 'woocommerce_product_tabs', 'woocommerce_product_reviews_tab', 40 );
add_action( 'woocommerce_product_tab_panels', 'woocommerce_product_attributes_panel', 50 );
add_action( 'woocommerce_product_tabs', 'woocommerce_product_attributes_tab', 50 );
add_action( 'woocommerce_product_tabs', array( &$woocommerce_product_enquiry_form,'product_enquiry_tab' ), 60 );
add_action( 'woocommerce_product_tab_panels', array( &$woocommerce_product_enquiry_form,'product_enquiry_tabs_panel' ), 60 );
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment