Noel asked this 3 months ago

Add global text in woocommerce product template

I want to add a global text that shows up on all products (not edit the product and add manually), is there a way without altering product template?

guruprakash 3 months ago

If you want it exactly after short description this is better:

function myglobal_short_descr($sdescription)
   $text="Global Text Goes Here";
   return $sdescription.$text;
mohlal 3 months ago

Add this to functions.php of your theme

add_action( 'woocommerce_before_single_product', 'add_text_after_excerpt_single_product', 25 );
function add_text_after_excerpt_single_product()
{    global $product;   
 // Output your custom text    
  echo 'Global Text Goes Here';