Hi @kasparsmime,
In this plugin, you can’t apply coupons for frequently bought together deals. Instead of using coupons, you can use discount for each additional product and discount for the main product when buying at least one product in this list.
“Add Separately” is designed to allow users to create a deal when all Bought Together items inside are just separate products bought together literally with no discounts applied.
When this option is enabled:
All discounts applied to Bought Together items will be removed.
https://prnt.sc/1rd1nho
https://prnt.sc/1rd1jq9
Prices of associated products will be changed back to the original prices.
https://prnt.sc/1rd1rfl
When the main product is removed from the cart or cart page, Bought Together items still stay.
https://prnt.sc/1rd1wn8
WPC Product Bundles has the options to exclude bundles, bundled products or both from coupon application. You can set it up in the plugin settings.
Regards,
Hi, thanks for getting back.
My main issue is that if a user has put a Frequently Bought Together deal in the cart, I don’t want to give a chance to them to get even bigger discount by adding a coupon (if they have one). And at the moment coupons are accepted and adds more discount to these deals.
When you said “In this plugin, you can’t apply coupons for frequently bought together deals” – did you mean something else?
Hi @kasparsmime
Please try below snippet (How to add custom code?):
add_filter( 'woocommerce_coupon_is_valid_for_product', 'woobt_coupon_restrict', 10, 4 );
function woobt_coupon_restrict( $valid, $product, $coupon, $cart_item ) {
if ( isset( $cart_item['woobt_parent_id'] ) || isset( $cart_item['woobt_ids'] ) ) {
return false;
}
return $valid;
}
Great, thank you. It works!:)