Viewing 15 posts - 1 through 15 (of 15 total)
  • Author
    Posts
  • #16235
    invisiblecodeweaver
    Participant

    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

    #16236
    Soft79
    Keymaster

    We haven’t received any email.

    #16237
    Soft79
    Keymaster

    Ok, 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?

    #16242
    invisiblecodeweaver
    Participant

    Yes, 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

    #16243
    Soft79
    Keymaster

    Please 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)

    #16244
    invisiblecodeweaver
    Participant

    I whitelisted the country Netherland and now, you can access the store without any restriction.

    #16245
    invisiblecodeweaver
    Participant

    We forwarded you the site details and requested stuff at admin at soft79.nl please check your email.

    #16249
    Soft79
    Keymaster

    I 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.

    #16251
    invisiblecodeweaver
    Participant

    As 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.jpg

    #16252
    Soft79
    Keymaster

    As stated you need to update to 3.2.2 first.

    #16269
    invisiblecodeweaver
    Participant

    We 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.jpg

    #16270
    Soft79
    Keymaster

    I 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.

    #16275
    invisiblecodeweaver
    Participant

    As 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.

    #16281
    Soft79
    Keymaster

    What 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.

    #16293
    Soft79
    Keymaster

    Any news on this?

Viewing 15 posts - 1 through 15 (of 15 total)
  • You must be logged in to reply to this topic.