November 3, 2016 at 12:59 pm #758
I’m using WooCommerce Extended Coupon Features together with Subscriptions and other products.
I’ve used the included code (commented out by default) to update the cart whenever the user changes the shipping method.
I have a couple of auto coupons that I set up with only BACS payments. They all work as expected for normal products, but with subscription products, although they scroll up to the message “Coupon applied: name of my coupon”, they don’t add the coupont item with the negative number to the cart.
Is there a way I can get around this?November 3, 2016 at 6:38 pm #763Soft79Keymaster
Please send me a link and instrucions on how to reproduce the issue.November 4, 2016 at 9:41 am #782
Here is my example site:
Here is what I did in steps (so you can reproduce the issue)
- Installed woocommerce, WooCommerce Extended Coupon Features, and Subscriptions
- Installed a free theme, but tried it with others as well, the issue remains the same (current theme is Storefront from WP registry)
- Created a simple product (t-shirt), a Subscription product (subscription)
- Created an auto coupon that gets applied when the Check paymants are selected
- Setup subscriptions to manual mode
- Added your snippet at the end of woocommerce-jos-autocoupon.php to update the checkout cart once there is a change in payment methods
WHEN IT WORKS
- with tshirt
- When you add the subscription product to your basket and the system has saved that your default payment method is check payment
- HOWEVER: If you go to the checkout and change payment method to something else and then back to check payments, it stops applying the coupon
Thank you very much for the help. I’m trying to fix this for days now.November 4, 2016 at 10:47 am #783Soft79Keymaster
It looks like the subscription plugin does something to the cart cookie in a way that is not compatible with my plugin. Probably has something to do with the order in which actions/filters are handled.
Would you mind hacking my plugin a bit? Find this line in wjecf-autocoupon.php (line 28):
add_action( 'woocommerce_after_calculate_totals', array( &$this, 'update_matched_autocoupons' ) );
add_action( 'woocommerce_after_calculate_totals', array( &$this, 'update_matched_autocoupons' ), 1 );
add_action( 'woocommerce_after_calculate_totals', array( &$this, 'update_matched_autocoupons' ), 999 );
Let me know if it helps?
If not, I will need to take a look and need ftp and admin access. You can send it to me through the contact page.
PS: The snippet you uncommented should be placed in functions.php of your child theme to make it update safe.November 4, 2016 at 10:54 am #785
Neither of the hacks worked. Thanks for the PS by the way. However this is just an example site I’ve set up for asking help ;P
I’m sending you the details via the contact page.
Again, thanks for the help.November 7, 2016 at 5:01 pm #804
Is there a chance you might have another look at it? I’ve emailed you FTP details now as well. Thanks a lot.
- You must be logged in to reply to this topic.