Skip to content

Instantly share code, notes, and snippets.

@neilgee
Last active April 14, 2020 07:07
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save neilgee/039a36b9d21593ee042a to your computer and use it in GitHub Desktop.
Save neilgee/039a36b9d21593ee042a 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