Hi Christian,
This depends on whether you’re changing a WooCommerce default tab (Description, Additional Information, Reviews) or you’re changing one of our custom tabs. Regardless, you’ll need to use a filter function.
It looks like you’re only trying to change the WooCommerce Description tab, so here is the filter for that:
add_filter( 'woocommerce_product_description_heading', 'yikes_woo_customize_description_tab_title', 1000 );
function yikes_woo_customize_description_tab_title() {
echo '<h2>My Own Title</h2>';
}
If you’re trying to change the title of the tab itself, this will change the description tab to “My Own Text.”
// Rename a default WooCommerce tab
add_filter( 'woocommerce_product_tabs', 'yikes_rename_default_woocommerce_tabs', 98, 1 );
function yikes_rename_default_woocommerce_tabs( $tabs ) {
if ( isset( $tabs['description'] ) ) {
$tabs['description']['title'] = 'My Own Text';
}
return $tabs;
}
Hope that’s what you’re looking for. Let me know if you need any help applying these functions to your site.
Cheers,
Kevin.
That helped me. Thanks alot!