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

    (@josk79)

    I see. Can you please try changing the following in woocommerce-jos-autocoupon.php of the plugin:

    Change

    add_action( 'wp_loaded', array( &$this, 'coupon_by_url' )); //Coupon through url

    to

    add_action( 'wp_loaded', array( &$this, 'coupon_by_url' ), 23); //Coupon through url

    Please let me know if this works for you.

    Thread Starter Marshall Stevenson

    (@spryd)

    Unfortunately that didn’t work. I even cleared cache on server and on computer. I’m running WC 2.2.8 as I haven’t had a chance to thoroughly test 2.3.x with the theme and plugins. Will that make a difference? Any other suggestions?

    Plugin Author Soft79

    (@josk79)

    Well the order of hooks in WC 2.2.8 differs from 2.3.x. It would be great if you had a test environment to try it out. Can you arrange that?

    Thread Starter Marshall Stevenson

    (@spryd)

    I just created the staging environment and have all WC plugins and core updated. It still isn’t adding the coupon when it adds the product /w variation.

    Thread Starter Marshall Stevenson

    (@spryd)

    I thought maybe it was my theme as well, so went to a basic install of 2013 and still not working. I even created the product just straight as a variable product as opposed to a variable subscription product. And still it won’t work.

    It will work if the item is in the cart already, the URL variable then applies it to the cart, but I would need to add it to the cart first.

    Plugin Author Soft79

    (@josk79)

    Can you please send login credentials to kalverdijk at hotmail.com so I can try it out?

    Plugin Author Soft79

    (@josk79)

    Do you still need help regarding this issue?

    I have a similar issue: trying to add a product via an url and a coupon at the same time (cart/?add-to-cart=11&apply_coupon=testit). The product is added but I get: Sorry, this coupon is not applicable to your cart contents.

    It works when I refresh the cart page though.

    If I put add_action( ‘wp_loaded’, array( &$this, ‘coupon_by_url’ ), 23); //Coupon through url like you suggests, the product is added but that’s all (no coupon, no warning).

    Running WC 2.3.9 and the last Extended Coupon Features version.

    Thanks for your help!

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Adding items to cart and applying coupon through URL’ is closed to new replies.