-
Notifications
You must be signed in to change notification settings - Fork 217
Store-API: After successful checkout with a coupon code for 100% discount the items remain in the cart. #10438
Comments
Hi @kodes-agency. Thank you so much for reporting this. Can you provide more details for your environment (you can obtain this information in WooCommerce > Status)? Thank you |
Hi @wavvves, thank you for your quick reply! I have tried with different restrictions and limits but the result is all the same. Here are the environment details: WordPress EnvironmentWC Version: 7.9.0 Server EnvironmentServer Info: nginx/1.18.0 SUHOSIN Installed: – DatabaseWC Database Version: 7.9.0 Post Type Countsacf-field: 1 SecuritySecure connection (HTTPS): ✔ Active Plugins (1)WooCommerce: by Automattic – 7.9.0 Inactive Plugins (2)Advanced Custom Fields: by WP Engine – 6.1.7 SettingsAPI Enabled: – Taxonomies: Product Visibility: exclude-from-catalog (exclude-from-catalog) Connected to WooCommerce.com: – WC PagesShop base: #6 - /shop/ ThemeName: Twenty Twenty-Two TemplatesOverrides: – AdminEnabled Features: activity-panels Disabled Features: minified-js Daily Cron: ✔ Next scheduled: 2023-08-02 11:55:28 +03:00 Action SchedulerComplete: 322 Failed: 2 Pending: 1 Status report informationGenerated at: 2023-08-01 17:34:44 +03:00 |
Thanks for providing the environment details and the steps on how you created the coupon. Unfortunately, I'm still unable to reproduce this issue. Could you please double-check if you see the same issue on a fresh WordPress site? Meanwhile, I'll ask my colleagues if one of them can reproduce this issue. |
Hey there! I will try to replicate it on a fresh copy as soon as possible and I will get back to you with the results. |
My colleagues also looked into this issue and @roykho pointed out that virtual products immediately show the status |
@kodes-agency Sorry for the delayed response. I'm unable to reproduce the issue. It would be helpful if you could replicate this on one of your test instances and share its credentials. Also, is this happen only Cart and Checkout block pages? Could you please try reproducing the problem with the shortcode(legacy) Checkout and let us know? Looking forward to hearing back from you. |
It uses processing if the order "needs_processing"—in this case it will use processing if the order contains a simple product that needs shipping. If the order contains only virtual products it will be completed. Unless an extension modifies this behaviour. As for clearing the cart, it happens when the order received page is shown. If you make the request via the API, the cart contains won't be cleared automatically. Having gone through the checkout process with the 100% coupon I also cannot reproduce the issue, and since its been 2 weeks I will close this out. Thanks |
Describe the bug
The bug is evident only when using a coupon code for 100% discount of the cart items. After successful checkout, the item remain in the cart.
I assume that it has to do with the order status. When the order has amount greater than 0, the status is set to "processing". However, if the amount is 0 due to 100& discount coupon, the order status is "completed".
Suggestions
I believe that it's best if the status even after a coupon code for 100% remains "processing" instead of "completed", otherwise it confuses the store managers that receive a new order with the wrong status tag.
The text was updated successfully, but these errors were encountered: