June 24, 2020 at 1:54 am #15918
1) We want the users to select the variation of his choice. We can’t fix the size and colour of a cloth which we are giving in free. We need to provide an option to user to select the same. So we can’t select from Edit coupon page.
It was told from your side, this is due to the swatch plugin. I have removed swatch plugins. Now default dropdown comings for variation selection. Still, it’s not working. Refer: https://prnt.sc/t548yv
Please have a look and help us to solve it. The process to replicate it remains the same
a) Add 2 quantity of any product to cart and click on buy now button.
b) It will take you to a checkout page where the option to select free product is there.
c) Buy2get1 coupon is applied automatically.
d) Not able to select a free product.
P.S Tried in default theme also, not working at the checkout page. Though works on the cart page.June 24, 2020 at 1:55 am #15919
P.S Tried in default theme also, not working at the checkout page. Though works on the cart page.
2) I got the BOGO thing sorted.
3) You didn’t answer (posted in the last message), How to remove the filter
( woocommerce_cart_totals_coupon_label ) from ‘WJECF_Autocoupon’ class. I tried to remove the filter for this class but It’s not working. I want to add my own filter for coupon label.
It would be better if we can set up a skype call for better understanding and saving time.
Thank you very much.June 24, 2020 at 11:26 am #15921
1) It does seem to work if I test it, but the free item must be in stock. Our plugin doesn’t handle stock management for variations. if a product is in stock it is added. So please explain ‘doesn’t work’.
3) If you want to override the filter your can just do so without removing our filter by using a higher priority-number. You can remove it the normal way using remove_filter though, you just need the instance of our class object which you can get by using
WJECF()->get_plugin('auto'). Do check if an object is returned though.
I don’t do Skype. Contact is by email or this forum.June 29, 2020 at 5:22 am #15949
a) Your plugin default behaviour is not working, like it’s not adding to cart automatically once I select variation from dropdown like it does in default theme.
b) I am able to checkout (click on place order button ) without even selecting the product or variation. I am able to checkout by selecting out of stock variation also.
In default theme it gives error that this variation is out of stock you can’t add it to cart. If I try to checkout without selecting free product it gives error that you should select variation of free product. But its not happening in our case.
That’s why I asked for Skype so that I can show you by sharing screen if it’s possible.
2) For removing filter can you please help me with the proper code. I am using following code in functions.php file but still is not removing.
remove_filter( ‘woocommerce_cart_totals_coupon_label’, array( WJECF()->get_plugin(‘autocoupon’), ‘woocommerce_cart_totals_coupon_label’ ), 10 );
I am getting instance/object using this WJECF()->get_plugin(‘autocoupon’).June 29, 2020 at 6:04 pm #15962
2) try executing this in add_action(‘init’, …, 10)
1) I’ll get back to you when I’m at a pc.June 29, 2020 at 8:01 pm #15964
- You must be logged in to reply to this topic.