Skip to content

Instantly share code, notes, and snippets.

@lukecav
Forked from neilgee/woo-prod-description.php
Created October 6, 2016 02:03
Show Gist options
  • Select an option

  • Save lukecav/981c5ccb3537cb52913eab354ebe21b8 to your computer and use it in GitHub Desktop.

Select an option

Save lukecav/981c5ccb3537cb52913eab354ebe21b8 to your computer and use it in GitHub Desktop.
WooCommerce Move Product Description Above Product
<?php //<~ don't add me in
add_action( 'woocommerce_before_single_product', 'themeprefix_woocommerce_template_product_description', 20 );
/**
* Add product description above product
* Output description tab template using 'woocommerce_before_single_product' hook
*/
function themeprefix_woocommerce_template_product_description() {
wc_get_template( 'single-product/tabs/description.php' );
}
add_filter( 'woocommerce_product_tabs', 'themeprefix_woo_remove_product_tabs', 98 );
/**
* Remove WooCommerce Description Tab
*/
function themeprefix_woo_remove_product_tabs( $tabs ) {
unset( $tabs['description'] ); // Remove the description tab
return $tabs;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment