woocommerce add text after price to specific product or products

Solutions on MaxInterview for woocommerce add text after price to specific product or products by the best coders in the world

showing results for - "woocommerce add text after price to specific product or products"
Simón
30 Jul 2017
1add_filter( 'woocommerce_get_price_html', 'njengah_text_after_price' );
2
3function njengah_text_after_price($price){
4	
5	global $post;
6		
7	$product_id = $post->ID;
8	
9	$product_array = array( 1,2,3 );//add in the product IDs to add text after price
10	
11	if ( in_array( $product_id, $product_array )) {
12		
13		$text_to_add_after_price  = ' text to add after price for the specific products '; //change text in bracket to your preferred text 
14		  
15		  return $price .   $text_to_add_after_price;
16		  
17	}else{
18		
19		return $price; 
20	}
21		  
22} 
23
queries leading to this page
display custom text in product item woocommercewoocommerce add product attributesinsert product with regular price programetically woocommercewoocommerce different text for products without priceadd text before woocommerce product descriptionwoocommerce add text to single product pageadd text below price product page woocommerceadd product text woocommerceadding text to product name woocommercewoocommerce show text after product priceadd product template text woocommercewoocommerce add text after pricehow can i change product price text on woocommerce programmaticallyhwo to add a text after price in woocommrece product gridhow to add addons price on all products in woocommerceupdate product woocommercewoocommerce modify total for a productwoocommerce add text before pricedisplay text from product options in product woocommercewoocommerce update coupon product categorieshow to increase addon quantity in woocommercewoocommerce product price color settingwoocommerce product beforeadding text after price in woocommercewoocommerce add text after price to specific product or productsadd text to woocommerce product pagewoocommerce add text single productwoocommerce update product titleadd text after product title woocommerce product pageadd text after title product page woocommercewoocommerce append price with wordwoocommerce on product add set custom pricewoocommerce add product markadd text before price woocommerceadd custom product type woocommerceadd price to with quantity in single product page woocommerceadd content below product price woocommercewoocommerce product text after pricewoocommerce add quantity to product pagewoocommerce text class in variation productwoocommerce product title tag changewoocommerce single product page add text after pricewoocommerce product price text boxinsert text before product name woocommercewoocommerce add custom text below price productwoocommerce show text below product priceadd text on single product in woocommercehow to inset text before product title woocommercewoocommerce wordpress how to change product priceadd particular product quantity price change in woocommercewoocommerce add text to product name only in shopupdate product price programmatically in woocommercewoocommerce add text to product page how to add extra text in woocommerce product pricewoocommerce add custom text below price product pageadd content under product woocommerce on product pagewoocommerce update product price programmaticallyedit product price woocommercewoocommerce add text after product titledisplay products by latest addition in woocommercehook text after price single product page woocommercewoocommerce modify total price programatically for productadd text after product title woocommerceproduct on sale text woocommercehow to add product info right in woocommercewoocommerce add text after price to specific product or products