mika85
Forum Replies Created
-
Forum: Plugins
In reply to: [WooCommerce] Some orders not getting updated after successful paymentHello,
I have been experiencing a recurring issue with my WooCommerce store concerning the update of order statuses. Although payments are processed correctly by Stripe and the charge.succeeded webhooks are received without any issues, the order statuses are only updated 15 minutes after the actual payment, affecting all orders.
Here are the technical details:
? Stripe Plugin Version: 8.7.0
? WooCommerce Logs: The logs show that payment requests and webhook responses are received and processed correctly.
? Plugin Update: The Stripe plugin was recently updated, and I have re-authenticated the settings in WooCommerce.
? Server Performance: I have checked the server configuration, and it seems adequate for managing tasks in real-time.
Could you help me determine why these delays are occurring and how to resolve them? The delay in updating the statuses could affect the customer experience.
Thanks for your response Abul but this code doesn’t work either.
However, I entered the correct form number as well as the maximum number of entries and checked if my email field is correctly configured with the ’email’ identifier and it does not work.
On the other hand, this creates a conflict for me and no form goes through with any email address.
Have you tested on your side to see if the code you gave me works on your side?
Thank you anyway for your help.Sincerely
Mikaeladd_action('fluentform_before_insert_submission', function ($insertData, $data, $form) { if($form->id != 5) { // 8 is your form id. Change the 4 with your own login form ID return; } $redirectUrl = home_url(); // You can change the redirect url after successful login if (get_current_user_id()) { // user already registered wp_send_json_success([ 'result' => [ 'redirectUrl' => $redirectUrl, 'message' => 'You are already logged in. Redirecting now...' ] ]); } $email = \FluentForm\Framework\Helpers\ArrayHelper::get($data, 'email'); // your form should have email field $password = \FluentForm\Framework\Helpers\ArrayHelper::get($data, 'password'); // your form should have password field if(!$email || !$password) { wp_send_json_error('Please provide an email and password'); } $user = get_user_by_email($email); if($user && wp_check_password($password, $user->user_pass, $user->ID)) { wp_clear_auth_cookie(); wp_set_current_user($user->ID); wp_set_auth_cookie($user->ID); /* user is not logged in. * If you use wp_send_json_success the the submission will not be recorded * If you remove the wp_send_json_success then it will record the data in fluentform * in that case you should redirect the user on form submission settings */ wp_send_json_success([ 'result' => [ 'redirectUrl' => $redirectUrl, 'message' => 'You are logged in, please wait while you are being redirected.' ] ]); } else { wp_send_json_error('Identifiant ou mot de passe incorrecte'); } }, 10, 3);
Finally I found this code and it works very well
Thank you for forwarding the request to your teams.
Yes it works very well through the child theme but I would have liked this code to work for a single sales funnel via cartflows
Thank you Aamir for your contribution but the solution you propose via the code from github deletes all the items in the cart as soon as we change the page.
What I want for me is that this is done only when I leave a sales tunnel with products already added to the basket with this tunnel.
I tried to add this code in the “custom script” tab of the tunnel with cartflows but this code is not taken into account and does not work. (see picture below)
https://i.goopics.net/ka5yio.png
- This reply was modified 2 years, 3 months ago by mika85.
What I want is to remove the product from the basket when a person leaves a tunnel or a promotional page so that if the person returns to the site later, they can no longer see the promotional product in their basket.