How To Prevent Duplicate Orders
-
I need a resolution for this issue with duplicate orders that I am facing for a long time. Sometimes customer leaves the order is between because he/she forgot to apply code or had to remove or add some other product too. As a result, woocommerce creates a new order when checked out. Problem is that since a large number of products on my website have only 1 quantity, the order doesnt go through as the unit is being hold by the previous pending order.
I have to manually cancel the previous order to let customer complete fresh order. Is it possible to make sure that any changes that customer makes apply to existing order and it shouldn’t create a new order?
I lose a lot of customers due to this. Since I am not always online to manually cancel orders, customers leave and usually don’t come back as they think the website has some bugs.
-
Thanks for reaching out!
I understand that customers are leaving their orders incomplete, which results in a new order being created when they return to checkout. This can cause problems, especially when you have unique products with limited stock, is this correct?
Sometimes customer leaves the order is between because he/she forgot to apply code or had to remove or add some other product too. As a result, woocommerce creates a new order when checked out.
I am quite confused about this scenario on your site. You mentioned that customers leaves the order, however, they still check out afterwards?
To better picture what you are referring to here, can you please share with us a clear screenshot of what you see on your end so that we could address you more effectively?
If you don’t already have a screenshot service installed, you can try https://snipboard.io. You can share the direct link to the image as a response to this topic.
If you could also provide us with the step-by-step procedures for us to replicate the scenario on our end so that we could check this further?
Additionally, for us to investigate your issue further, I’d like to understand your site properly. Please share your System Status Report that you can find via
WooCommerce > Status
. SelectGet system report
and thenCopy for support
. Once you’ve done that, you can paste it into your reply here.If you could also provide the fatal error logs (if any) under
WooCommerce > Status > Logs
.You could copy and paste your reply here or paste it via https://gist.github.com/ and send the link here.
Thanks!
Hello @xue28 sorry for confusion. I have this discount coupon for orders above a certain amount. Frequently customer forget to apply the coupon and proceed to checkout, they realise it then leave the order incomplete, go back to their cart, apply the coupon and then attempt checkout again. This unfortunately triggers a new order. Since there is usually only one stock, they get error that not enough units are available for this product.
Another very frequent issue is that customer add 3-4 products and then proceed to checkout only to go back and remove 1-2 product from cart or sometimes add 1-2 more. This also triggers a new order and they get error for some books that there is not enough units available.
It happens so frequently now that it affects my business especially with new customers who think the website has some bugs and cannot complete checkout.
WordPress Environment WordPress address (URL): https://oldbookdepot.in Site address (URL): https://oldbookdepot.in WC Version: 7.5.1 REST API Version: ?</img> 7.5.1 WC Blocks Version: ?</img> 9.6.6 Action Scheduler Version: ?</img> 3.5.4 Log Directory Writable: ?</img> WP Version: 6.2 WP Multisite: – WP Memory Limit: 2 GB WP Debug Mode: – WP Cron: – Language: en_US External object cache: ?</img> Server Environment Server Info: Apache/2.4.56 (Debian) PHP Version: 7.4.33 PHP Post Max Size: 512 MB PHP Time Limit: 3000 PHP Max Input Vars: 3000 cURL Version: 7.64.0 OpenSSL/1.1.1n SUHOSIN Installed: – MySQL Version: 5.5.5-10.4.20-MariaDB-1:10.4.20+maria~buster-log Max Upload Size: 500 MB Default Timezone is UTC: ?</img> fsockopen/cURL: ?</img> SoapClient: ?</img> DOMDocument: ?</img> GZip: ?</img> Multibyte String: ?</img> Remote Post: ?</img> Remote Get: ?</img> Database WC Database Version: 7.5.1 WC Database Prefix: wpvz_ Total Database Size: 4959.74MB Database Data Size: 4476.62MB Database Index Size: 483.12MB wpvz_woocommerce_sessions: Data: 3802.98MB + Index: 153.92MB + Engine InnoDB wpvz_woocommerce_api_keys: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wpvz_woocommerce_attribute_taxonomies: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wpvz_woocommerce_downloadable_product_permissions: Data: 0.02MB + Index: 0.06MB + Engine InnoDB wpvz_woocommerce_order_items: Data: 6.52MB + Index: 2.52MB + Engine InnoDB wpvz_woocommerce_order_itemmeta: Data: 110.64MB + Index: 34.11MB + Engine InnoDB wpvz_woocommerce_tax_rates: Data: 0.02MB + Index: 0.06MB + Engine InnoDB wpvz_woocommerce_tax_rate_locations: Data: 0.02MB + Index: 0.05MB + Engine InnoDB wpvz_woocommerce_shipping_zones: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wpvz_woocommerce_shipping_zone_locations: Data: 0.02MB + Index: 0.05MB + Engine InnoDB wpvz_woocommerce_shipping_zone_methods: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wpvz_woocommerce_payment_tokens: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wpvz_woocommerce_payment_tokenmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wpvz_woocommerce_log: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wpvz_actionscheduler_actions: Data: 5.02MB + Index: 5.34MB + Engine InnoDB wpvz_actionscheduler_claims: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wpvz_actionscheduler_groups: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wpvz_actionscheduler_logs: Data: 3.02MB + Index: 3.03MB + Engine InnoDB wpvz_ac_abandoned_cart_history_lite: Data: 37.08MB + Index: 0.00MB + Engine InnoDB wpvz_ac_email_templates_lite: Data: 0.20MB + Index: 0.00MB + Engine InnoDB wpvz_ac_guest_abandoned_cart_history_lite: Data: 1.08MB + Index: 0.00MB + Engine InnoDB wpvz_ac_sent_history_lite: Data: 1.03MB + Index: 0.00MB + Engine InnoDB wpvz_adtribes_my_conversions: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wpvz_cartflows_ca_cart_abandonment: Data: 0.06MB + Index: 0.02MB + Engine InnoDB wpvz_cartflows_ca_email_history: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wpvz_cartflows_ca_email_templates: Data: 0.08MB + Index: 0.00MB + Engine InnoDB wpvz_cartflows_ca_email_templates_meta: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wpvz_check_pincode_p: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wpvz_commentmeta: Data: 1.52MB + Index: 3.03MB + Engine InnoDB wpvz_comments: Data: 25.55MB + Index: 17.09MB + Engine InnoDB wpvz_datalist: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wpvz_es_deliverreport: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wpvz_es_emaillist: Data: 0.09MB + Index: 0.00MB + Engine InnoDB wpvz_es_notification: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wpvz_es_sentdetails: Data: 0.38MB + Index: 0.00MB + Engine InnoDB wpvz_es_subscriber_ips: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wpvz_followup_coupons: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wpvz_followup_coupon_logs: Data: 0.02MB + Index: 0.05MB + Engine InnoDB wpvz_followup_customers: Data: 0.06MB + Index: 0.09MB + Engine InnoDB wpvz_followup_customer_carts: Data: 1.52MB + Index: 0.06MB + Engine InnoDB wpvz_followup_customer_notes: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wpvz_followup_customer_orders: Data: 0.05MB + Index: 0.02MB + Engine InnoDB wpvz_followup_email_excludes: Data: 0.02MB + Index: 0.05MB + Engine InnoDB wpvz_followup_email_logs: Data: 0.02MB + Index: 0.05MB + Engine InnoDB wpvz_followup_email_orders: Data: 0.08MB + Index: 0.09MB + Engine InnoDB wpvz_followup_email_tracking: Data: 0.02MB + Index: 0.08MB + Engine InnoDB wpvz_followup_followup_history: Data: 1.50MB + Index: 0.05MB + Engine InnoDB wpvz_followup_order_categories: Data: 0.06MB + Index: 0.03MB + Engine InnoDB wpvz_followup_order_items: Data: 0.06MB + Index: 0.05MB + Engine InnoDB wpvz_followup_subscribers: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wpvz_followup_subscribers_to_lists: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wpvz_followup_subscriber_lists: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wpvz_giftvouchers_list: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wpvz_giftvouchers_setting: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wpvz_giftvouchers_template: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wpvz_links: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wpvz_metaseo_images: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wpvz_mobileassistant_failed_login: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wpvz_mobileassistant_push_settings: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wpvz_mobileassistant_session_keys: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wpvz_mobileassistant_users: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wpvz_ms_snippets: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wpvz_newsletter: Data: 2.52MB + Index: 0.52MB + Engine InnoDB wpvz_newsletter_emails: Data: 0.14MB + Index: 0.00MB + Engine InnoDB wpvz_newsletter_sent: Data: 0.05MB + Index: 0.03MB + Engine InnoDB wpvz_newsletter_stats: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wpvz_newsletter_user_logs: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wpvz_nf3_actions: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wpvz_nf3_action_meta: Data: 0.08MB + Index: 0.00MB + Engine InnoDB wpvz_nf3_chunks: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wpvz_nf3_fields: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wpvz_nf3_field_meta: Data: 1.52MB + Index: 0.00MB + Engine InnoDB wpvz_nf3_forms: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wpvz_nf3_form_meta: Data: 0.06MB + Index: 0.00MB + Engine InnoDB wpvz_nf3_objects: Data: 0.09MB + Index: 0.00MB + Engine InnoDB wpvz_nf3_object_meta: Data: 8.52MB + Index: 0.00MB + Engine InnoDB wpvz_nf3_relationships: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wpvz_nf3_upgrades: Data: 1.50MB + Index: 0.00MB + Engine InnoDB wpvz_options: Data: 7.03MB + Index: 3.16MB + Engine InnoDB wpvz_pimwick_gift_card: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wpvz_pimwick_gift_card_activity: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wpvz_pincode_setting_p: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wpvz_postmeta: Data: 233.77MB + Index: 138.34MB + Engine InnoDB wpvz_posts: Data: 49.58MB + Index: 11.98MB + Engine InnoDB wpvz_pwaforwp_analytics_data: Data: 0.25MB + Index: 0.00MB + Engine InnoDB wpvz_pwaforwp_analytics_overall: Data: 0.06MB + Index: 0.00MB + Engine InnoDB wpvz_snippets: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wpvz_sr_woo_order_items: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wpvz_termmeta: Data: 1.52MB + Index: 1.88MB + Engine InnoDB wpvz_terms: Data: 1.52MB + Index: 3.03MB + Engine InnoDB wpvz_term_relationships: Data: 7.47MB + Index: 5.41MB + Engine InnoDB wpvz_term_taxonomy: Data: 1.52MB + Index: 0.95MB + Engine InnoDB wpvz_usermeta: Data: 66.59MB + Index: 30.08MB + Engine InnoDB wpvz_users: Data: 2.52MB + Index: 4.55MB + Engine InnoDB wpvz_vtprd_purchase_log: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wpvz_vtprd_purchase_log_product: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wpvz_vtprd_purchase_log_product_rule: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wpvz_wcmp_products_map: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wpvz_wcmp_vendor_orders: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wpvz_wcsearch_cache: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wpvz_wczp_postcode: Data: 1.52MB + Index: 0.00MB + Engine InnoDB wpvz_wc_admin_notes: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wpvz_wc_admin_note_actions: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wpvz_wc_cancel_orders: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wpvz_wc_category_lookup: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wpvz_wc_customer_lookup: Data: 1.52MB + Index: 1.70MB + Engine InnoDB wpvz_wc_download_log: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wpvz_wc_gpf_render_cache: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wpvz_wc_mnm_child_items: Data: 0.06MB + Index: 0.03MB + Engine InnoDB wpvz_wc_od_time_framemeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wpvz_wc_od_time_frames: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wpvz_wc_order_bundle_lookup: Data: 0.20MB + Index: 0.38MB + Engine InnoDB wpvz_wc_order_coupon_lookup: Data: 0.44MB + Index: 0.47MB + Engine InnoDB wpvz_wc_order_product_lookup: Data: 4.52MB + Index: 6.02MB + Engine InnoDB wpvz_wc_order_stats: Data: 3.52MB + Index: 3.34MB + Engine InnoDB wpvz_wc_order_tax_lookup: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wpvz_wc_product_attributes_lookup: Data: 7.52MB + Index: 7.23MB + Engine InnoDB wpvz_wc_product_download_directories: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wpvz_wc_product_meta_lookup: Data: 2.52MB + Index: 4.19MB + Engine InnoDB wpvz_wc_rate_limits: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wpvz_wc_reserved_stock: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wpvz_wc_tax_rate_classes: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wpvz_wc_webhooks: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wpvz_wdr_order_discounts: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wpvz_wdr_order_item_discounts: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wpvz_wdr_rules: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wpvz_webpushr_abandoned_cart: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wpvz_wfblockediplog: Data: 0.05MB + Index: 0.00MB + Engine InnoDB wpvz_wfblocks7: Data: 0.06MB + Index: 0.05MB + Engine InnoDB wpvz_wfconfig: Data: 0.48MB + Index: 0.00MB + Engine InnoDB wpvz_wfcrawlers: Data: 0.05MB + Index: 0.00MB + Engine InnoDB wpvz_wffilechanges: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wpvz_wffilemods: Data: 4.52MB + Index: 0.00MB + Engine InnoDB wpvz_wfhits: Data: 4.52MB + Index: 0.34MB + Engine InnoDB wpvz_wfhoover: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wpvz_wfissues: Data: 0.05MB + Index: 0.06MB + Engine InnoDB wpvz_wfknownfilelist: Data: 2.52MB + Index: 0.00MB + Engine InnoDB wpvz_wflivetraffichuman: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wpvz_wflocs: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wpvz_wflogins: Data: 1.52MB + Index: 0.16MB + Engine InnoDB wpvz_wfls_2fa_secrets: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wpvz_wfls_settings: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wpvz_wfnotifications: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wpvz_wfpendingissues: Data: 0.02MB + Index: 0.06MB + Engine InnoDB wpvz_wfreversecache: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wpvz_wfsnipcache: Data: 0.06MB + Index: 0.05MB + Engine InnoDB wpvz_wfstatus: Data: 0.17MB + Index: 0.09MB + Engine InnoDB wpvz_wftrafficrates: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wpvz_woocommerce_bundled_itemmeta: Data: 0.41MB + Index: 0.56MB + Engine InnoDB wpvz_woocommerce_bundled_items: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wpvz_woocommerce_gpf_google_taxonomy: Data: 1.52MB + Index: 0.00MB + Engine InnoDB wpvz_woof_query_cache: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wpvz_woo_sr_cart_items: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wpvz_woo_sr_orders: Data: 0.11MB + Index: 0.05MB + Engine InnoDB wpvz_woo_sr_order_items: Data: 0.06MB + Index: 0.02MB + Engine InnoDB wpvz_woo_wallet_transactions: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wpvz_woo_wallet_transaction_meta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wpvz_wpfm_backup: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wpvz_wpmlautoresponderemails: Data: 0.02MB + Index: 0.06MB + Engine InnoDB wpvz_wpmlautoresponders: Data: 0.02MB + Index: 0.06MB + Engine InnoDB wpvz_wpmlautorespondersforms: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wpvz_wpmlautoresponderslists: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wpvz_wpmlbounces: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wpvz_wpmlclicks: Data: 0.02MB + Index: 0.06MB + Engine InnoDB wpvz_wpmlcontents: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wpvz_wpmlcountries: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wpvz_wpmlemails: Data: 0.02MB + Index: 0.11MB + Engine InnoDB wpvz_wpmlfields: Data: 0.02MB + Index: 0.05MB + Engine InnoDB wpvz_wpmlfieldsforms: Data: 0.02MB + Index: 0.05MB + Engine InnoDB wpvz_wpmlfieldslists: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wpvz_wpmlforms: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wpvz_wpmlgroups: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wpvz_wpmlhistoriesattachments: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wpvz_wpmlhistorieslists: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wpvz_wpmlhistory: Data: 0.02MB + Index: 0.06MB + Engine InnoDB wpvz_wpmllatestposts: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wpvz_wpmllatestpostssubscriptions: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wpvz_wpmllinks: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wpvz_wpmlmailinglists: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wpvz_wpmloptions: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wpvz_wpmlorders: Data: 0.02MB + Index: 0.06MB + Engine InnoDB wpvz_wpmlposts: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wpvz_wpmlsubscribermetas: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wpvz_wpmlsubscribers: Data: 0.02MB + Index: 0.11MB + Engine InnoDB wpvz_wpmlsubscriberslists: Data: 0.02MB + Index: 0.08MB + Engine InnoDB wpvz_wpmlsubscribersoptions: Data: 0.02MB + Index: 0.05MB + Engine InnoDB wpvz_wpmltemplates: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wpvz_wpmlthemes: Data: 0.17MB + Index: 0.03MB + Engine InnoDB wpvz_wpmlunsubscribes: Data: 0.02MB + Index: 0.06MB + Engine InnoDB wpvz_wpms_links: Data: 0.02MB + Index: 0.05MB + Engine InnoDB wpvz_wps_hit: Data: 0.16MB + Index: 0.50MB + Engine InnoDB wpvz_wps_index: Data: 11.52MB + Index: 13.55MB + Engine InnoDB wpvz_wps_key: Data: 1.52MB + Index: 0.47MB + Engine InnoDB wpvz_wps_object_term: Data: 1.52MB + Index: 1.78MB + Engine InnoDB wpvz_wps_object_type: Data: 0.02MB + Index: 0.08MB + Engine InnoDB wpvz_wps_query: Data: 0.06MB + Index: 0.05MB + Engine InnoDB wpvz_wps_uri: Data: 0.11MB + Index: 0.05MB + Engine InnoDB wpvz_wps_user_agent: Data: 0.05MB + Index: 0.02MB + Engine InnoDB wpvz_yith_wcwl: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wpvz_yith_wcwl_lists: Data: 0.08MB + Index: 0.11MB + Engine InnoDB wpvz_yith_ywrac_email_log: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wpvz_yoast_indexable: Data: 30.56MB + Index: 13.30MB + Engine InnoDB wpvz_yoast_indexable_hierarchy: Data: 2.47MB + Index: 3.88MB + Engine InnoDB wpvz_yoast_migrations: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wpvz_yoast_primary_term: Data: 1.52MB + Index: 0.70MB + Engine InnoDB wpvz_yoast_seo_links: Data: 0.05MB + Index: 0.03MB + Engine InnoDB wpvz_ywcdd_calendar: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wpvz_ywrr_email_blocklist: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wpvz_ywrr_email_schedule: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wpvz_ywsfl_list: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_actionscheduler_actions: Data: 0.02MB + Index: 0.13MB + Engine InnoDB wp_actionscheduler_claims: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_actionscheduler_groups: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_actionscheduler_logs: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_bv_fw_requests: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_bv_ip_store: Data: 0.16MB + Index: 0.09MB + Engine InnoDB wp_bv_lp_requests: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_commentmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_comments: Data: 0.02MB + Index: 0.09MB + Engine InnoDB wp_links: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_options: Data: 0.33MB + Index: 0.03MB + Engine InnoDB wp_postmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_posts: Data: 0.02MB + Index: 0.06MB + Engine InnoDB wp_termmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_terms: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_term_relationships: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_term_taxonomy: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_usermeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_users: Data: 0.02MB + Index: 0.05MB + Engine InnoDB wp_wc_admin_notes: Data: 0.05MB + Index: 0.00MB + Engine InnoDB wp_wc_admin_note_actions: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_wc_category_lookup: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_wc_customer_lookup: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_wc_download_log: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_wc_order_coupon_lookup: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_wc_order_product_lookup: Data: 0.02MB + Index: 0.06MB + Engine InnoDB wp_wc_order_stats: Data: 0.02MB + Index: 0.05MB + Engine InnoDB wp_wc_order_tax_lookup: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_wc_product_meta_lookup: Data: 0.02MB + Index: 0.09MB + Engine InnoDB wp_wc_reserved_stock: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_wc_tax_rate_classes: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_wc_webhooks: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_woocommerce_api_keys: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_woocommerce_attribute_taxonomies: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_woocommerce_downloadable_product_permissions: Data: 0.02MB + Index: 0.06MB + Engine InnoDB wp_woocommerce_log: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_woocommerce_order_itemmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_woocommerce_order_items: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_woocommerce_payment_tokenmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_woocommerce_payment_tokens: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_woocommerce_sessions: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_woocommerce_shipping_zones: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_woocommerce_shipping_zone_locations: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_woocommerce_shipping_zone_methods: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_woocommerce_tax_rates: Data: 0.02MB + Index: 0.06MB + Engine InnoDB wp_woocommerce_tax_rate_locations: Data: 0.02MB + Index: 0.03MB + Engine InnoDB Post Type Counts attachment: 13098 blocked_user: 97 blocked_user_lite: 11 bnfw_notification: 1 br_product_tab: 1 br_tabs_location: 1 cartflows_flow: 3 cartflows_step: 9 custom-css-js: 1 customize_changeset: 70 custom_css: 5 es_template: 4 jetpack_migration: 2 mc4wp-form: 1 nav_menu_item: 115 nf_sub: 735 page: 47 popup: 1 popup_theme: 7 post: 8 postman_sent_mail: 250 product: 12230 product_enquiry: 3 product_variation: 5 revision: 245 shop_coupon: 14 shop_order: 24651 shop_order_refund: 45 ufaq: 16 wccaf: 1 wcccf: 3 wcct_countdown: 1 wcps: 1 wcsearch_form: 5 wcs_ruleset: 1 wpcd_coupons: 7 wpcode: 2 wpgv_voucher_product: 1 wp_block: 1 wp_global_styles: 1 yith-wccos-ostatus: 1 yith_carrier: 1 yith_proc_method: 1 yith_wcdls_offer: 1 yith_wcps_type: 6 ywar_reviews: 5639 ywdpd_discount: 7 ywrac_cart: 1 ywrac_email: 2 Security Secure connection (HTTPS): ?</img> Hide errors from visitors: ?</img> Active Plugins (43) WooCommerce added to cart popup (Ajax): by XootiX – 1.5 Allow Multiple Accounts: by Scott Reilly – 3.0.4 Breeze: by Cloudways – 2.0.19 Code Snippets: by Code Snippets Pro – 3.3.0 Data Analytics for PWA: by Magazine3 – 1.7 Disable Cart Fragments: by Optimocha – 2.2 Free Shipping Badge: by Cvijetin Maletic – 1.1.2 Frontend Product Editor: by WPVibes – 1.0.3 Heartbeat Control by WP Rocket: by WP Rocket – 2.0 Kadence WooCommerce Email Designer: by Kadence WP – 1.5.10 Login No Captcha reCAPTCHA (Google): by Robert Peake and Contributors – 1.7.1 Mobile Assistant Connector: by eMagicOne – 2.2.4 Perfect Brands WooCommerce: by QuadLayers – 3.0.5 Post SMTP: by Post SMTP – 2.4.7 Pull to Refresh for PWA: by PWAforWP Team – 1.6 PWA for WP: by Magazine3 – 1.7.57 PWA Pro Extension Manager: by PWAforWP Team – 1.9.2.2 PWA to APK Plugin: by PWAforWP Team – 1.5 Qty Increment Buttons for WooCommerce: by taisho – 2.7.5 Quick Action for PWA: by PWAforWP Team – 1.1 Search Attributes for WooCommerce: by Aslam Doctor – 1.3.3 Shipping Phone: by – Storefront Powerpack: by WooCommerce – 1.6.2 Theme Customisations: by WooThemes – 1.0.0 User Switching: by John Blackbourn & contributors – 1.7.0 WooCommerce No Shipping Message: by dangoodman – 2.1.3 Woo Align Buttons: by 320up – 3.6.8 Woo Empty Cart Button: by WPCodelibrary – 1.4.0 WooCommerce - Instamojo: by instamojo – 1.1.2 Product Feed PRO for WooCommerce: by AdTribes.io – 12.4.8 Razorpay for WooCommerce: by Team Razorpay – 4.4.3 Woocommerce Single Product Page Customizer: by Geek Code Lab – 2.3 Abandoned Cart Lite for WooCommerce: by Tyche Softwares – 5.14.1 WooCommerce Conditional Shipping and Payments: by WooCommerce – 1.14.4 Pixel Manager for WooCommerce: by SweetCode – 1.30.3 WooCommerce Mix and Match Products: by Kathy Darling – 2.2.2 WooCommerce Order Delivery: by Themesquad – 2.2.2 WooCommerce Product Bundles: by WooCommerce – 6.17.3 WooCommerce Product Stock Alert: by WC Marketplace – 1.7.5 HUSKY - Products Filter Professional for WooCommerce: by realmag777 – 1.3.2 WooCommerce: by Automattic – 7.5.1 Yoast SEO: by Team Yoast – 20.4 WP Google Analytics: by Aaron D. Campbell – 1.4.1 Inactive Plugins (3) Ninja Forms: by Saturday Drive – 3.6.21 Product Tabs Manager for WooCommerce: by BeRocket – 1.1.5.8 Really Simple SSL: by Really Simple Plugins – 6.2.3 Dropin Plugins (2) advanced-cache.php: advanced-cache.php object-cache.php: Object Cache Pro (Drop-in) Must Use Plugins (1) Object Cache Pro (MU): by Rhubarb Group – 1.18.0 Settings API Enabled: ?</img> Force SSL: – Currency: INR (?) Currency Position: left Thousand Separator: , Decimal Separator: . Number of Decimals: 2 Taxonomies: Product Types: bundle (bundle) external (external) grouped (grouped) mix and match (mix-and-match) pw gift card (pw-gift-card) simple (simple) variable (variable) wbs_bundle (wbs_bundle) woosb (woosb) Taxonomies: Product Visibility: exclude-from-catalog (exclude-from-catalog) exclude-from-search (exclude-from-search) featured (featured) outofstock (outofstock) rated-1 (rated-1) rated-2 (rated-2) rated-3 (rated-3) rated-4 (rated-4) rated-5 (rated-5) Connected to WooCommerce.com: – Enforce Approved Product Download Directories: – Order datastore: WC_Order_Data_Store_CPT WC Pages Shop base: #4 - /shop/ Cart: #5 - /cart/ Checkout: #6 - /checkout/ My account: #7 - /my-account/ Terms and conditions: ?</img> Page not set Theme Name: Bookshop Version: 1.0.20 Author URL: https://woocommerce.com Child Theme: ?</img> Parent Theme Name: Storefront Parent Theme Version: 4.2.0 Parent Theme Author URL: https://woocommerce.com/ WooCommerce Support: ?</img> Templates Overrides: bookshop/woocommerce/single-product/review-meta.php Mix and Match Products Version: 2.2.2 Database Version: 2.2.2 Template Overrides: – Product Bundles Database Version: 6.17.3 Loopback Test: ?</img> Template Overrides: – Admin Enabled Features: activity-panels analytics coupons customer-effort-score-tracks import-products-task experimental-fashion-sample-products shipping-smart-defaults shipping-setting-tour homescreen marketing multichannel-marketing mobile-app-banner navigation onboarding onboarding-tasks remote-inbox-notifications remote-free-extensions payment-gateway-suggestions shipping-label-banner subscriptions store-alerts transient-notices woo-mobile-welcome wc-pay-promotion wc-pay-welcome-page Disabled Features: minified-js new-product-management-experience product-variation-management settings Daily Cron: ?</img> Next scheduled: 2022-10-15 06:40:07 +05:30 Options: ?</img> Notes: 21 Onboarding: completed Action Scheduler Canceled: 2 Oldest: 2023-04-10 15:44:43 +0530 Newest: 2023-04-10 17:10:07 +0530 Complete: 10,590 Oldest: 2023-03-13 11:40:17 +0530 Newest: 2023-04-13 11:38:13 +0530 Failed: 42 Oldest: 2022-11-29 00:02:36 +0530 Newest: 2023-04-10 17:37:03 +0530 Pending: 5 Oldest: 2023-04-13 11:43:45 +0530 Newest: 2023-04-20 03:20:21 +0530 Order Delivery Minimum working days: 1 Checkout location: After additional fields Checkout options: text Max delivery days: 90 Delivery fields: optional Enable local pickup: ?</img> Overrides: - Shipping Days Sunday: ?</img> Cut-off time: - Monday: ?</img> Cut-off time: - Tuesday: ?</img> Cut-off time: - Wednesday: ?</img> Cut-off time: - Thursday: ?</img> Cut-off time: - Friday: ?</img> Cut-off time: - Saturday: ?</img> Cut-off time: - Delivery Ranges Local: 2 - 3 Shipping methods: specific Default: 3 - 6 Shipping methods: - Delivery Days Sunday: ?</img> No of orders: 0 Shipping methods: all Time frames: no Monday: ?</img> No of orders: 0 Shipping methods: all Time frames: no Tuesday: ?</img> No of orders: 0 Shipping methods: all Time frames: no Wednesday: ?</img> No of orders: 0 Shipping methods: all Time frames: no Thursday: ?</img> No of orders: 0 Shipping methods: all Time frames: no Friday: ?</img> No of orders: 0 Shipping methods: all Time frames: no Saturday: ?</img> No of orders: 0 Shipping methods: all Time frames: no Status report information Generated at: 2023-04-13 11:44:20 +05:30 `
Hi @mayank29gupta ,
I understand that it can be frustrating for customers to forget to apply a discount coupon and then have to go back to their cart to apply it.
To help prevent this issue, you can have a look at the
Cart Discounts for WooCommerce extension which includes the feature to automatically apply a coupon to their cart based on the conditions met, and what makes this even better, is a popup appears when this has occurred ??You can read more about this, and other awesome features of this extension, on the Cart Discounts for WooCommerce extension page.
WooCommerce.com offers a 30-day refund policy which you can take advantage of, allowing you to test the extension, and make sure that it is what you are looking for.
Should you have any pre-sales related questions, kindly contact us directly at WooCommerce.com > My Account > Support. You will need to create an account if you do not have one already.
Another very frequent issue is that customer add 3-4 products and then proceed to checkout only to go back and remove 1-2 product from cart or sometimes add 1-2 more. This also triggers a new order and they get error for some books that there is not enough units available
I have created a few test products with stock set to
1
and followed the steps on my test site to try and reproduce the issue. However I am unable to reproduce this as the session/order remains the same.For clarity, when you say a new order is triggered, do you mean that their cart is emptied once they have updated the cart by either adding or removing products?
Once we have more clarity on what you are experiencing on your end, we’ll be able to assist you more effectively.
Cheers!
Hello @beautyofcode thanks for the reply. I have added couple of screenshots to better explain.
View post on imgur.com
In the first image you will see that customer created order with one product and didn’t complete the payment because he decided to add more products.
So he added a couple of more products to cart and started checkout again but this generated a new order instead which shows this error.
Not enough units of Madame Bovary by Gustave Flaubert (Penguin Classics) are available in stock to fulfil this order.
This happened because there was only one copy of madame bovary and woocommerce created two orders as you can see in screenshots.
Same thing happens when customer forgets to apply coupon later as it also generates a new order
Thank you for providing further information about your issue here.
In the first image you will see that customer created order with one product and didn’t complete the payment because he decided to add more products.
When a customer starts the checkout process but doesn’t complete it, WooCommerce will still create an order in the system with a
Pending Payment
status. If the customer decides to add more products and starts the checkout process again, a new order will be generated. This is the intended behavior of WooCommerce to keep track of abandoned carts and potential sales.So he added a couple of more products to cart and started checkout again but this generated a new order instead which shows this error.
Not enough units of Madame Bovary by Gustave Flaubert (Penguin Classics) are available in stock to fulfil this order.
This happened because there was only one copy of madame bovary and woocommerce created two orders as you can see in screenshots.
In this case, the error message appears because the first order still holds the stock for that item. Since there’s only one copy of Madame Bovary in stock, the system prevents the customer from adding more than one copy to their cart.
You can enable the Hold Stock option under WooCommerce > Settings > Products > Inventory and set the
x
minutes to hold stock (for unpaid orders). When this limit is reached, the pending order will be cancelled.Same thing happens when customer forgets to apply coupon later as it also generates a new order
Regarding the issue with coupons, if a customer forgets to apply a coupon and starts the checkout process again, it will generate a new order as well.
You can also install a plugin that allows customers to apply coupons during the checkout process. Checking our marketplace, I found the premium plugin, WooCommerce Smart Coupons which provides an option for customers to apply a coupon code directly on the checkout page.
Should you have further presales inquiries about this plugin, please open a support request for us to address you more effectively.
Hope this helps!
Hello @xue28 thanks for the reply. I have already tried using minutes to hold stock (for unpaid orders). Didn’t work out. It seems there is no way to fix it. Thanks for the help.
Hello @mayank29gupta,
Hello @xue28 thanks for the reply. I have already tried using minutes to hold stock (for unpaid orders). Didn’t work out. It seems there is no way to fix it. Thanks for the help.
I understand your frustration at this point. Just to clarify, when a customer lands on the checkout page, a new order will be created regardless of whether they place the order or not.
I attempted to replicate the issue on my test site; however, the order is only created when I complete the checkout process.
This type of issue is typically caused by a conflict with your theme or another plugin.
The best way to determine this is to:
- Temporarily switch your theme to Storefront
- Disable all plugins except for WooCommerce
- Repeat the action that is causing the problem
If you’re not comfortable doing all of this on the live version of your site, you can create a staging environment using WP-STAGING.
If you’re not seeing the same problem after completing the conflict test, then you know the problem was with the plugins and/or theme you deactivated. To figure out which plugin is causing the problem, reactivate your other plugins one by one, testing after each, until you find the one causing conflict. You can find a more detailed explanation on how to do a conflict test here.
Let us know how it goes!Hello @babylon1999 thanks for the reply. New order is actually generated once the customer selects a payment gateway on checkout page and clicks on Place Order button which redirects customer to payment page of gateway.
I dont think woocommerce is at fault here at all. Its just customer behavior and I was hoping to find some solution. One idea was to disable checkout for customers if they have a pending order and redirect them to orders tab in accounts setting. However this won’t work for guest user.
The other idea was to use some custom code which would check for pending order from customer and cancel it before proceeding to checkout or when clicked on Place Order button, but I don’t think there is any code to achieve it.
Thank you for the clarification. In that case, I suggest you get in touch with the payment gateway you’re using, their team might already have a workaround for this behaviour.
You can get in touch with RazorPay’s support from here: https://razorpay.com/support/#request
Cheers!
Hello @babylon1999 thanks for the reply. I already spoke to them but since its default behavior of woocommerce they were unable to do anything. As a result I started looking into some custom code that would help me out. This code below should release stock if order is pending and customer visits his cart again. The idea is that if customer doesn’t complete order, and decides to go back to make modification, this code should immediately release the stock. Would love your input on this.
add_action( 'woocommerce_before_cart', 'release_held_stock_quantity' ); add_action( 'woocommerce_before_checkout_form', 'release_held_stock_quantity' ); function release_held_stock_quantity() { // Get the product IDs in the cart or checkout $product_ids = array(); foreach ( WC()->cart->get_cart() as $cart_item ) { $product_ids[] = $cart_item['product_id']; } // Check if any of the products are in pending orders foreach ( $product_ids as $product_id ) { $pending_orders = wc_get_orders( array( 'status' => 'pending', 'type' => 'shop_order', 'limit' => -1, 'meta_query' => array( 'relation' => 'AND', array( 'key' => '_customer_user', 'value' => get_current_user_id(), 'compare' => '=', ), array( 'key' => '_hold_stock_product_id', 'value' => $product_id, 'compare' => '=', ), ), ) ); // Release the held stock quantity for the product in the pending order foreach ( $pending_orders as $pending_order ) { $order_items = $pending_order->get_items(); foreach ( $order_items as $order_item ) { if ( $order_item->get_product_id() == $product_id ) { $product = wc_get_product( $product_id ); $product_stock_quantity = $product->get_stock_quantity(); $order_item_quantity = $order_item->get_quantity(); $new_stock_quantity = $product_stock_quantity + $order_item_quantity; $product->set_stock_quantity( $new_stock_quantity ); $product->save(); $order_item->set_meta_data( '_hold_stock_released', true ); $order_item->save(); } } } } }
-
This reply was modified 1 year, 11 months ago by
mayank29gupta.
Thanks for sharing further information about your issue here.
I understand that you are using the code snippet above that would release stock if order is pending and customer visits his cart again.
Kindly be informed that custom coding is not something we can assist with directly. However, I’ll keep this thread open for a bit to see if anyone from the community can lend a hand.
If you have any other questions related to development or custom coding, don’t hesitate to reach out to some of the great resources we have available for support. The WooCommerce community is filled with talented open-source developers, and many of them are active on the channels listed below:
- WooCommerce Developer Resources Portal
- WooCommerce Advanced Facebook group
- WooCommerce Developer Slack Channel
- Hire a WooCommerce Expert
Hope this helps!
- The topic ‘How To Prevent Duplicate Orders’ is closed to new replies.