Friday, May 29, 2015

WooCommerce Change Description Tab Title & Heading To Product Name



To change the WooCommerce Single Product Description tab title and heading to the product name, place the following PHP code in your theme’s functions.php file



<?php
// Change the description tab title to product name
add_filter( 'woocommerce_product_tabs', 'wc_change_product_description_tab_title', 10, 1 );
function wc_change_product_description_tab_title( $tabs ) {
global $post;
if ( isset( $tabs['description']['title'] ) )
$tabs['description']['title'] = $post->post_title;
return $tabs;
}
// Change the description tab heading to product name
add_filter( 'woocommerce_product_description_heading', 'wc_change_product_description_tab_heading', 10, 1 );
function wc_change_product_description_tab_heading( $title ) {
global $post;
return $post->post_title;
}
?>

A Blogger

I am passionate blogger cum B.Tech. Computer engineering graduate. I love writing the blog posts. I spend my leisure time in writing blog post that will useful to everyone (including me). I have had some success making money blogging and want to help others do the same. I just figured that by creating a great and free resource a lot of links would follow – and they have. Some people ask me how they can repay me – which is not necessary - but for those wanting to show their appreciation, I just say linking to the article from their blog is the best compensation I could receive. Thanks for reading!

0 comments:

Post a Comment

 

Copyright @ 2013 WooCommerce Helper .

Designed by Kcon Technosoft