Skip to content

Instantly share code, notes, and snippets.

@stevenhoney
Created October 23, 2015 12:17
Show Gist options
  • Save stevenhoney/cf9e693b03644884f08d to your computer and use it in GitHub Desktop.
Save stevenhoney/cf9e693b03644884f08d to your computer and use it in GitHub Desktop.
Remove the product description tab in WooCommerce
<?php
/**
* Plugin Name: WooCommerce Remove Description Tab
* Plugin URI: https://wordpress.org/support/topic/how-to-keep-additional-info-but-remove-description
* Description: **Remove the product description tab.
* Version: 1.0
* Author: SteveHoneyNZ
* Tested up to: 4.3
*/
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
/**
* You could just copy from below this comment into your theme's functions.php file.
* But you maybe shouldn't - https://tommcfarlin.com/functions-php-vs-plugin-who-wins/
*/
add_filter( 'woocommerce_product_tabs', 'woo_remove_description_tab', 98 );
function woo_remove_description_tab( $tabs ) {
unset($tabs['description']);
return $tabs;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment