• Resolved marycka9

    (@marycka9)


    Good day!
    I use your plugin and when i change it, i find current bag:

    I need change auto apply on get parameter and when validate current coupon in function $coupon->is_valid(), it return FALSE.

    I add alternative functionality in function.php, and it return true:
    $coupon = new WC_Coupon($resultCoupon);
    $coupon->is_valid(); // true

    in file:

    wp-content/plugins/woocommerce-auto-added-coupons/includes/WJECF_AutoCoupon.php:304

    $coupon = WJECF_WC()->get_coupon( $coupon_code );
    $coupon->is_valid() // FALSE

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Soft79

    (@josk79)

    What are the coupon settings and what is in the cart when you have the ‘bug’?

    Thread Starter marycka9

    (@marycka9)

    I need to cancel the auto-coupon if a parameter with a coupon has been sent to the URL. At the moment, a message is displayed that the coupon has been applied. In fact, this is not so. Autocoupon still remains.

    Thread Starter marycka9

    (@marycka9)

    In the settings are set 2 autocoupon (for different products), and a bunch of ordinary coupons.

    Plugin Author Soft79

    (@josk79)

    Please, try to explain with all the details. The current info is too vague for me to help you.

    Thread Starter marycka9

    (@marycka9)

    I have 3 products and 2 auto coupons on the site.
    When a user visits a site (without a coupon in the URL), the auto-coupon should be applied, depending on the product selection. It’s all right, it works.
    When I try to apply a coupon to a URL, it does not apply, and only the auto-coupon is shown in the cart.
    So it should work? Can I in some way delete the auto-coupon and apply the coupon from the URL?

    Plugin Author Soft79

    (@josk79)

    A manual coupon takes presedence over Auto Coupons. No PHP script required. Can you send me an url to reproduce the issue?

    Thread Starter marycka9

    (@marycka9)

    Need functionality don’t available with free version.
    We’re buy PRO version and all right work.
    Thanks!

    • This reply was modified 7 years, 1 month ago by marycka9.
Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Bug in $coupon->is_valid()’ is closed to new replies.