Repository › Forums › Support › WooCommerce Extended Coupon Features PRO › Free gift coupon
- This topic has 21 replies, 3 voices, and was last updated 2 years, 10 months ago by Soft79.
-
AuthorPosts
-
August 26, 2020 at 8:16 am #16235invisiblecodeweaverParticipant
Hi,
Again we are facing the issue related to the coupon of free gift on the new user for there first order, as the new user registered on the store with the fresh email address on his first order the coupon should be applied to get the free gift on his order but the coupon didn’t apply on his first order. I’m forwarding the details of the coupon at your admin email address please look at your email admin at soft79.nl.
Thankyou
August 26, 2020 at 8:39 am #16236Soft79KeymasterWe haven’t received any email.
August 26, 2020 at 8:47 am #16237Soft79KeymasterOk, first, in a previous message I asked you to disable ‘Usage limit per user’. It’s still enabled.
Second, please answer the questions from our last message:
1. Are you absolutely sure that the customers system was never used to place an order?
2. Can you reproduce this issue from a private browser window using a fresh email address?
August 26, 2020 at 12:53 pm #16242invisiblecodeweaverParticipantYes, as on your previous recommendation related to the disabling the “Usage limit per user” we disable the limit i-e “0” but we have an issue with this, after disabling the usage limit this coupon will automatically apply on every user second order. This coupon is only for users who are newly registered on-site and place their first order, not for the existing users on their second order.
Yes, we tested with the fresh email in the different private browsers but still, we are facing the same issue.
Please kindly resolve this issue.
Did you receive the email?
Thank you
August 26, 2020 at 1:12 pm #16243Soft79KeymasterPlease whitelist access from the Netherlands on your store so I can test this.
Disabling “usage limit per user” should not be necessary when using “first purchase only”. If it does matter we do need to find out what’s wrong with that (for example in a test environment)
August 27, 2020 at 5:46 am #16244invisiblecodeweaverParticipantI whitelisted the country Netherland and now, you can access the store without any restriction.
August 27, 2020 at 8:06 am #16245invisiblecodeweaverParticipantWe forwarded you the site details and requested stuff at admin at soft79.nl please check your email.
August 27, 2020 at 11:42 am #16249Soft79KeymasterI could not reproduce the issue on your site but nonetheless I found something that was off.
First of all the ‘first purchase’ functionality wasn’t working in your store because the ‘Pending payment’, ‘Awaiting payment’ and ‘Verification’ order statuses were not taken in account.
I have just released version 3.2.2 which adds ‘Pending payment’ by default and a filter to override the statuses that are taken in account.
Since ‘Awaiting verification’ and ‘Awaiting payment’ are custom statuses that are not in WC core you need to apply the following snippet so orders with these statuses are also taken in account:add_filter( 'wjecf_first_order_statuses_to_check', function( $order_statuses ) { return array_merge( $order_statuses, [ 'wc-verification', 'wc-pwaiting' ] ); }, 10, 1 );
After that, please remove the ‘Limit usage’ value and try again.
August 27, 2020 at 2:06 pm #16251invisiblecodeweaverParticipantAs on your recommendation, we added the snippet on over store and remove the ‘limit usage’ i-e 0 and placed register the user with the fresh email. The new user gets the free gift by the coupon on his first purchase as what we want, but when we place the second order with the same user he get the free gift again but this is not what we want. We want to restrict every new user/existing to use this coupon only one time at there first order.
First-order number: 57493 TEst Purpose
Second-order number: 57494 TEst Purpose
As you can see in the Screenshot.
https://snipboard.io/Oh3DaK.jpg
https://snipboard.io/e3mXKC.jpg
https://snipboard.io/G5AyTh.jpgAugust 27, 2020 at 2:28 pm #16252Soft79KeymasterAs stated you need to update to 3.2.2 first.
August 29, 2020 at 11:22 am #16269invisiblecodeweaverParticipantWe followed the steps which you recommended us firstly we updated the plugin to 3.2.2 and then added the snippet on over the store after that we remove the “limit usage” after performing all the steps we move toward the testing and we register with the new user with the fresh email. On the first-order, the coupon is applied correctly but when we go for the second-order with different products/category products we get the free gift on the second-order as well, as you can see in the screenshot. We want to restrict/limit every new user/existing to get this coupon only one time at there first order. Please kindly test at your end. As I have forward you the store details at your admin email.
First-order: https://snipboard.io/QLCT4B.jpg
Second-order:
https://snipboard.io/zluk8D.jpg
https://snipboard.io/VBKgm4.jpgAugust 29, 2020 at 12:44 pm #16270Soft79KeymasterI see, a typo in the usage of the filter in 3.2.2. Please edit
pro/class-wjecf-pro-controller.php line 72 and replace
$order_Statuses
with$order_statuses
(Notice the capital s)
I will release the fix after the weekend.
August 31, 2020 at 6:44 am #16275invisiblecodeweaverParticipantAs you recommended to replace line 72 $order_Statuses with $order_statuses as you can see on the screenshot (https://snipboard.io/sokD8T.jpg). After that, we tested with the fresh email, placed the first order and the coupon applied correctly, we saw that if the first-order status is Awaiting payment and during this time, the same customer place another order means the 2nd order then he will also get a free coupon gift on his second purchase.
The snippet is also applied and active in our store related to the ‘Awaiting verification’ and ‘Awaiting payment’ which you gave us a few days ago.August 31, 2020 at 4:12 pm #16281Soft79KeymasterWhat are the order numbers of the two orders with the coupon applied for the same customer?
I can’t test it currently, your staging site seems to have issues.
September 3, 2020 at 2:08 pm #16293Soft79KeymasterAny news on this?
-
AuthorPosts
- You must be logged in to reply to this topic.