Please submit a private ticket if you need to share sensitive information, such as license details and admin credentials.

Okay
  Public Ticket #3750766
Issue with Discount Rules and WooCommerce Product Bundles
Open

Comments

  • Berto started the conversation

    Dear WPClever Support,

    I am facing an issue with how WooCommerce Product Bundles interacts with my discount rules, and I need assistance.

    Context:

    I want to exclude products within the bundles from triggering automatic discounts, but no matter what I try, the products within the bundle are being treated as individual products for the discount. Here's a summary of what I've tried:

    What I Have Tried:
    1. Using the 'woo_discount_rules_exclude_cart_item_from_discount' filter:
      • I tried to exclude products within the bundle using this filter, but it did not work as expected. I was checking if the cart item had a specific key (indicating it was part of a bundle) and returning true to exclude it from discounts. However, the discount is still applied as if the bundle items are individual products.
    2. Custom plugin:
      • I wrote a custom plugin where I tried excluding products that belong to the "packs" category, but this also failed. Despite excluding the category, the bundle items continue to count as individual products.
    3. Coupon restrictions:
      • I checked the Coupon Restrictions in WooCommerce Product Bundles, but this seems to only affect coupons with codes and not automatic discounts.
    Current Issue:

    I would like the bundles to be treated as a single product for the discount, or for the items within the bundle to be excluded from triggering the discount. Could you provide guidance on how to achieve this?

    Thank you for your help!

    Best regards, Berto de la Rosa