Home Forums Virtue Theme How to exclude products from code added to functions.php

This topic is: resolved
Resolved
Posted in: Virtue Theme  
  • February 8, 2018 at 11:35 am #178430

    Hi
    I know this isn’t exactly theme support related, but i’m not getting any support from woo and i’m past my deadline . If you guys can please help me out.

    I created a code that adds a button below product short description. I added the code in functions.php. But I don’t want to include two of my products with this code. Is there a way to exclude products via product id/sku or something. Please see code:

    add_action( 'woocommerce_single_product_summary', 'return_policy', 20 );
     
    function return_policy() {
    	echo do_shortcode('[wcm_nonmember][maxbutton id="5"][/wcm_nonmember]');
    }

    Sorry, this forum is for Premium customers only. Please Login to continue

    If you are using a free theme you can access support on wordpress.org by searching for the free theme and using the support tab.