Skip to content

Usage limit for discount error #26741

@VGOCommunity

Description

@VGOCommunity

Describe the bug
The problem is:
When a customer use a coupon (with a usage limit per user and per coupon) and go click on checkout and click on Proceed to Paypal, if the cancell the operation or get out of that page without acepting and paying, when coming back to do a new operation or start from the beggining, the coupon cannot be applied again as it said it has been used it when it hasn't.

I am not an expert so I have no idea what to explain. I installed few plugins to get better option for discount but I don't think that's the problem as the error happens whit the normal option and the rest of the plugins, it is not only one type of coupon... with all of them happens.

For example, I have a plugin which is "first order discount" and when people cancell the payment and try it again they don't have it anymore and we recieved a lot of complaint.

It happens as well when I create a normal one, so please, help me out on this because my customers are complaining.

I am going to show you with both cases, the one for first order discounts and one normal one created with woocommers.

When trying it to create the screenshot it happened another error as well, when cancelling and returning to the cart again there was an error saying that the order cannot be cancelled again.

This is very frustrating.

The steps are:
A new customer start adding products to the cart.
Then they accept the total amount and click on checkout and proceed to paypal.
Then, for whatever reason they go out of that check out page and come back.
Then, they don't have coupon any more or it counts like you have used it when you haven't

Screenshots
a
b
c
d
e
f
e
d

Expected behavior
The both coupons to work no matter how many times you cancelled the operation

Isolating the problem (mark completed items with an [x]):

  • [ x] I have deactivated other plugins and confirmed this bug occurs when only WooCommerce plugin is active.
  • This bug happens with a default WordPress theme active, or Storefront.
  • [x ] I can reproduce this bug consistently using the steps above.

WordPress Environment

Details ``` ` ### WordPress Environment ###

WordPress address (URL): https://vgo.community
Site address (URL): https://vgo.community
WC Version: 4.2.0
REST API Version: ✔ 1.0.8
WC Blocks Version: ✔ 2.5.16
Action Scheduler Version: ✔ 3.1.6
WC Admin Version: ✔ 1.2.3
Log Directory Writable: ✔
WP Version: 5.4.1
WP Multisite: –
WP Memory Limit: ❌ 40 MB - We recommend setting memory to at least 64MB. See: Increasing memory allocated to PHP
WP Debug Mode: –
WP Cron: ✔
Language: en_US
External object cache: –

Server Environment

Server Info: Apache
PHP Version: 7.3.18
PHP Post Max Size: 6 MB
PHP Time Limit: 300
PHP Max Input Vars: 1000
cURL Version: 7.38.0
OpenSSL/1.0.1t

SUHOSIN Installed: –
MySQL Version: 5.7.30-log
Max Upload Size: 64 MB
Default Timezone is UTC: ✔
fsockopen/cURL: ✔
SoapClient: ✔
DOMDocument: ✔
GZip: ✔
Multibyte String: ✔
Remote Post: ✔
Remote Get: ✔

Database

WC Database Version: 4.2.0
WC Database Prefix: xsflqrPz
Total Database Size: 17.90MB
Database Data Size: 15.24MB
Database Index Size: 2.66MB
xsflqrPzwoocommerce_sessions: Data: 0.08MB + Index: 0.02MB + Engine InnoDB
xsflqrPzwoocommerce_api_keys: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
xsflqrPzwoocommerce_attribute_taxonomies: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
xsflqrPzwoocommerce_downloadable_product_permissions: Data: 0.02MB + Index: 0.06MB + Engine InnoDB
xsflqrPzwoocommerce_order_items: Data: 0.05MB + Index: 0.02MB + Engine InnoDB
xsflqrPzwoocommerce_order_itemmeta: Data: 0.30MB + Index: 0.23MB + Engine InnoDB
xsflqrPzwoocommerce_tax_rates: Data: 0.02MB + Index: 0.06MB + Engine InnoDB
xsflqrPzwoocommerce_tax_rate_locations: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
xsflqrPzwoocommerce_shipping_zones: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
xsflqrPzwoocommerce_shipping_zone_locations: Data: 0.08MB + Index: 0.06MB + Engine InnoDB
xsflqrPzwoocommerce_shipping_zone_methods: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
xsflqrPzwoocommerce_payment_tokens: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
xsflqrPzwoocommerce_payment_tokenmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
xsflqrPzwoocommerce_log: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
xsflqrPzactionscheduler_actions: Data: 0.11MB + Index: 0.11MB + Engine InnoDB
xsflqrPzactionscheduler_claims: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
xsflqrPzactionscheduler_groups: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
xsflqrPzactionscheduler_logs: Data: 0.06MB + Index: 0.03MB + Engine InnoDB
xsflqrPzblc_filters: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
xsflqrPzblc_instances: Data: 0.02MB + Index: 0.05MB + Engine InnoDB
xsflqrPzblc_links: Data: 0.05MB + Index: 0.06MB + Engine InnoDB
xsflqrPzblc_synch: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
xsflqrPzcommentmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
xsflqrPzcomments: Data: 0.05MB + Index: 0.09MB + Engine InnoDB
xsflqrPzlinks: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
xsflqrPzmailchimp_carts: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
xsflqrPzmailchimp_jobs: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
xsflqrPzoptions: Data: 11.47MB + Index: 0.22MB + Engine InnoDB
xsflqrPzpostmeta: Data: 1.52MB + Index: 0.45MB + Engine InnoDB
xsflqrPzposts: Data: 0.33MB + Index: 0.06MB + Engine InnoDB
xsflqrPztermmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
xsflqrPzterms: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
xsflqrPzterm_relationships: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
xsflqrPzterm_taxonomy: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
xsflqrPzusermeta: Data: 0.08MB + Index: 0.03MB + Engine InnoDB
xsflqrPzusers: Data: 0.02MB + Index: 0.05MB + Engine InnoDB
xsflqrPzwc_admin_notes: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
xsflqrPzwc_admin_note_actions: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
xsflqrPzwc_category_lookup: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
xsflqrPzwc_customer_lookup: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
xsflqrPzwc_download_log: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
xsflqrPzwc_order_coupon_lookup: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
xsflqrPzwc_order_product_lookup: Data: 0.05MB + Index: 0.06MB + Engine InnoDB
xsflqrPzwc_order_stats: Data: 0.02MB + Index: 0.05MB + Engine InnoDB
xsflqrPzwc_order_tax_lookup: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
xsflqrPzwc_product_meta_lookup: Data: 0.02MB + Index: 0.09MB + Engine InnoDB
xsflqrPzwc_tax_rate_classes: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
xsflqrPzwc_webhooks: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
xsflqrPzwdp_orders: Data: 0.02MB + Index: 0.05MB + Engine InnoDB
xsflqrPzwdp_order_items: Data: 0.02MB + Index: 0.06MB + Engine InnoDB
xsflqrPzwdp_rules: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
xsflqrPzwoocommerce_square_customers: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
xsflqrPzwpforms_tasks_meta: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
xsflqrPzwpmm_subscribers: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
xsflqrPzyoast_indexable: Data: 0.09MB + Index: 0.05MB + Engine InnoDB
xsflqrPzyoast_indexable_hierarchy: Data: 0.02MB + Index: 0.05MB + Engine InnoDB
xsflqrPzyoast_migrations: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
xsflqrPzyoast_primary_term: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
xsflqrPzyoast_seo_links: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
xsflqrPzyoast_seo_meta: Data: 0.02MB + Index: 0.00MB + Engine InnoDB

Post Type Counts

attachment: 70
custom_css: 2
customize_changeset: 29
nav_menu_item: 11
page: 21
pfw_table: 3
post: 6
product: 124
revision: 148
shop_coupon: 24
shop_order: 62
shop_order_refund: 1
wc_product_table: 4
woo_discount: 2
woo_discount_cart: 1
wp_block: 3
wpautoterms_page: 3
wpforms: 1

Security

Secure connection (HTTPS): ✔
Hide errors from visitors: ✔

Active Plugins (32)

Alfred, the Assistant: by 1&1 IONOS – 5.5.1
Advanced Dynamic Pricing for WooCommerce: by AlgolPlus – 2.3.5 – Installed version not tested with active version of WooCommerce 4.2.0
Akismet Anti-Spam: by Automattic – 4.1.6
Antispam Bee: by pluginkollektiv – 2.9.2
WP AutoTerms: by WP AutoTerms – 2.4.1
Automatic Domain Changer: by NuageLab – 2.0.2
Broken Link Checker: by WPMU DEV – 1.11.13
Facebook for WooCommerce: by Facebook – 1.11.4
First Order Discount Woocommerce: by WooExtend – 1.14 – Installed version not tested with active version of WooCommerce 4.2.0
Site Kit by Google: by Google – 1.9.0
Jetpack by WordPress.com: by Automattic – 8.6.1
Google Ads for WooCommerce: by Kliken – 1.0.4 – Installed version not tested with active version of WooCommerce 4.2.0
Limit Login Attempts Reloaded: by WPChef – 2.13.0
Mailchimp for WooCommerce: by Mailchimp – 2.4.0 – Installed version not tested with active version of WooCommerce 4.2.0
Posts Table with Search & Sort: by Barn2 Plugins – 1.3.1
Refer A Friend for WooCommerce by WPGens: by Goran Jakovljevic – 1.2.0 – Installed version not tested with active version of WooCommerce 4.2.0
Regenerate Thumbnails Advanced: by ShortPixel – 2.3.0
TinyMCE Advanced: by Andrew Ozz – 5.4.0
WC Hide Shipping Methods: by Rynaldo Stoltz – 1.3
WooCommerce Product Table Lite: by WC Product Table – 1.9.3 – Installed version not tested with active version of WooCommerce 4.2.0
Advanced Order Export For WooCommerce: by AlgolPlus – 3.1.4 – Installed version not tested with active version of WooCommerce 4.2.0
WPC Product Bundles for WooCommerce: by WPClever.net – 5.2.0
WooCommerce eWAY Payment Gateway: by WooCommerce – 3.1.24 – Installed version not tested with active version of WooCommerce 4.2.0
Booster for WooCommerce: by Pluggabl LLC – 5.0.0 – Installed version not tested with active version of WooCommerce 4.2.0
WooCommerce Services: by Automattic – 1.23.0 – Installed version not tested with active version of WooCommerce 4.2.0
WooCommerce Square: by WooCommerce – 2.1.5 – Installed version not tested with active version of WooCommerce 4.2.0
WooCommerce: by Automattic – 4.2.0
Yoast SEO: by Team Yoast – 14.2
WP Mail SMTP: by WPForms – 2.0.1
WP Maintenance Mode: by Designmodo – 2.2.4
WPForms Lite: by WPForms – 1.6.0.2
Smart Coupons for WooCommerce: by WebToffee – 1.2.4 – Installed version not tested with active version of WooCommerce 4.2.0

Inactive Plugins (1)

Order Minimum/Maximum Amount for WooCommerce: by Algoritmika Ltd – 2.2.1 – Installed version not tested with active version of WooCommerce 4.2.0

Must Use Plugins (1)

1&1 Product Subdomain: by 1&1 – 1.1.0

Settings

API Enabled: –
Force SSL: –
Currency: AUD ($)
Currency Position: left
Thousand Separator: ,
Decimal Separator: .
Number of Decimals: 2
Taxonomies: Product Types: external (external)
grouped (grouped)
simple (simple)
variable (variable)
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: –

WC Pages

Shop base: ❌ Page visibility should be public
Cart: #8 - /cart
Checkout: #9 - /checkout
My account: #10 - /my-account
Terms and conditions: #351 - /wpautoterms/terms-and-conditions

Theme

Name: Exoplanet
Version: 1.9.1
Author URL: http://uxlthemes.com
Child Theme: ❌ – If you are modifying WooCommerce on a parent theme that you did not build personally we recommend using a child theme. See: How to create a child theme
WooCommerce Support: ✔

Templates

Overrides: exoplanet/woocommerce/content-product.php

Square

Environment: Production
Tokenization Enabled: –
Debug Mode: Off

Action Scheduler

Canceled: 1
Oldest: 2020-05-18 03:27:54 +1000
Newest: 2020-05-18 03:27:54 +1000

Complete: 331
Oldest: 2020-05-16 20:52:28 +1000
Newest: 2020-06-09 19:29:12 +1000

Failed: 1
Oldest: 2020-06-03 19:50:47 +1000
Newest: 2020-06-03 19:50:47 +1000

Pending: 2
Oldest: 2020-06-10 13:29:19 +1000
Newest: 2020-06-16 19:18:08 +1000

</details>

Metadata

Metadata

Labels

BugThe issue is a confirmed bug.PaymentsIssues related to payments.Store MarketingIssues related to store marketing.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions