Repository Forums Support WooCommerce Extended Coupon Features PRO condition for combo deal

Topic Resolution: Resolved
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #10166
    info17
    Participant

    Is it possible to make the condition for combo deal to require the same number for all items?
    It seems that the condition is calculated as total number of all items, not individual item.

    i.e.
    But 1 Product A + 1 Product B Get 1 Product A Free

    I tried to setup but 3 Product A + 1 Product B gives 2 Free Product A which should not.
    It should be:
    1 Product A + 1 Product B gives 1 Free Product A
    2 Product A + 2 Product B gives 2 Free Product A

    #10198
    Soft79
    Keymaster

    You can do this programatically by using this filter:

    add_filter( 'wjecf_free_product_amount_for_coupon', function( $coupon_qty, $coupon ) {
     //calculate the quantity and return it...
     return $coupon_qty;
    }, 10, 2 );
Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.