Repository Forums Support WooCommerce Extended Coupon Features PRO Notify on Checkout if auto coupon removed

Topic Resolution: Resolved
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #5249
    daniel.moore
    Participant

    Hi,
    I was wondering if you could give some guidance as to how you hook on to the auto-coupon logic.

    I need to set a pop up notice for those few who may hit “Remove” from an auto-coupon, so for example,

    When you meet the criteria for an auto-coupon, it applies automatically, but if this is somehow removed in error, I would like to display a notice to say before checking out “Warning, you are about to checko out without your offer! Click here to add our discount to the basket” (with a link that adds the coupon back in, we have a ?coupon=50OFF attribute we can add to the end of the URL which helps…

    We require this as we have had a few of our customers order and whilst they qualify for the auto-coupon, they don’t have it on their order!

    Kind Regards

    #5252
    Soft79
    Keymaster

    You can disable ‘remove’ for autocoupons from the settings page.

    Otherwise you need to do it programatically. You can verify which autocoupons were manually removed by using:

    $coupon_codes = WC()->session->get( 'wjecf_autocoupon_removed_coupons', array() );

    #5832
    daniel.moore
    Participant

    What does this code do?
    As in, where abouts on the order will it show us that the coupon was removed?

    #5839
    Soft79
    Keymaster

    By itself the code does nothing. But you can use it to get the codes of the removed autocoupons. How to integrate it is up to you…

    But the easiest way would be to just disable the ‘remove’ from the settings page.

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.