Hide Specific Tabs on the WooCommerce Product Page
Removes the Description, Reviews, and Additional Information tabs from a product page — common when a product's details are already covered elsewhere on the page and the default tabs just add clutter.
function wc_remove_product_tabs( $tabs ) {
// remove the description tab
unset( $tabs['description'] );
// remove the reviews tab
unset( $tabs['reviews'] );
// remove the additional information tab
unset( $tabs['additional_information'] );
return $tabs;
}
add_filter( 'woocommerce_product_tabs', 'wc_remove_product_tabs', 99 );
More WooCommerce snippets
Add a Custom Post Type Through WooCommerce
Lets a non-`product` post type behave like a purchasable WooCommerce item — pulling its price from a custom field and giving it a working "Add to Cart" button, without converting it into an actual Product post type.
Reorder (and Rename) the My Account Menu Tabs
Controls the exact order the tabs appear in on the WooCommerce My Account page, and lets you rename any of them at the same time — including slotting in a custom tab you've added elsewhere.
Add a Custom Tab to the WooCommerce My Account Page
Registers a brand new endpoint (in this example, "Premium Support") and adds it as its own tab in the My Account menu, complete with its own content area — the standard pattern for extending My Account with anything WooCommerce doesn't ship by default.