Public Ticket #3638555 Deactivate normal discount coupon codes when customer used Frequently Bought Together Open
Comments Mark started the conversation3 weeks ago on April 30, 2024 at 2:08pmIs there any way to deactivate normal discount coupon codes when customer used Frequently Bought Together? 963Dustin replied2 weeks ago on May 1, 2024 at 3:01amHi Mark,I'm so sorry for the late reply!Please add the custom code below. (How to add custom code? ↗): add_filter( 'woocommerce_coupon_is_valid_for_product', function ( $valid, $product, $coupon, $cart_item ) { if ( isset( $cart_item['woobt_parent_id'] ) || isset( $cart_item['woobt_ids'] ) ) { return false; } return $valid; }, 99, 4 );Let me know if it works.Best regards,DustinMark replied2 weeks ago on May 2, 2024 at 1:31pmHi Dustin, I applied the snippet in the functions file, however the discount codes are still working when having the bundles in cart. Can you please check? Our website is Groomzo.nl 963Dustin replied2 weeks ago on May 3, 2024 at 3:07amAre you questioning about WPC Frequently Bought Together or WPC Product Bundles?Please explain more about this issue with some screenshots or links.Best regards,DustinMark replied2 weeks ago on May 3, 2024 at 9:08amI'm sorry I mean of course frequently bought together :https://groomzo.nl/p/groomzo-professionele-hondentondeuse-complete-set/The snippet seems not working, when I add the frequently bought together items in my cart and go to checkout, the normal coupons are still working Sign in to reply ...
Is there any way to deactivate normal discount coupon codes when customer used Frequently Bought Together?
Hi Mark,
I'm so sorry for the late reply!
Please add the custom code below. (How to add custom code? ↗):
Let me know if it works.
Best regards,
Dustin
Hi Dustin,
I applied the snippet in the functions file, however the discount codes are still working when having the bundles in cart. Can you please check? Our website is Groomzo.nl
Are you questioning about WPC Frequently Bought Together or WPC Product Bundles?
Please explain more about this issue with some screenshots or links.
Best regards,
Dustin
I'm sorry I mean of course frequently bought together :
The snippet seems not working, when I add the frequently bought together items in my cart and go to checkout, the normal coupons are still working