Support » Plugins » woocommerce hook individual products

  • Hi, I am confronted with a problem which I cannot find any answer for: I would like to address specific products (through category or ID) on archive pages to add individual messages (or inject shortcodes for price deals) with hooks. Can someone tell how I can address products with certain criteria? This is what I added:

    add_action('woocommerce_after_shop_loop_item_title', 'add_custom_deals_msg', 30);
    
    function add_custom_deals_msg() {
    	if(is_product_catgory('7')) {
    		echo do_shortcode('[pricing_deal_msgs_standard]');
     }
    }

    Thanks a lot!!!

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘woocommerce hook individual products’ is closed to new replies.