Notice: These forums are now retired and closed. For active support, please Submit a Ticket or visit our official WordPress.org community pages.
Kadence Theme | Kadence Blocks | Starter Templates | WooCommerce Email Designer | Ascend | Virtue | Pinnacle

How to exclude products from code added to functions.php

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

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]');
}

  • The forum ‘Virtue Theme’ is closed to new topics and replies.