• Resolved jonsisk

    (@jonsisk)


    I’m getting the “Coupon XXX does not exist!” message for all new coupons I create. Old coupon codes still work. I’ve disabled all plugins, reverted to twentytwentytwo theme, confirmed that all the coupons and their meta look the same in the database.

Viewing 6 replies - 1 through 6 (of 6 total)
  • Thread Starter jonsisk

    (@jonsisk)

    Looks like it all has to do with upper/lowercase

    When you tell Woo to generate a coupon code, it shows it all caps and the post_title goes in ALL CAPS.

    When you look at the list of coupon codes they are all lowercase

    When you enter a coupon code during checkout, it appears to convert it to lowercase and then compare it against the post_title in the database, which might be uppercase, so it fails.

    Mirko P.

    (@rainfallnixfig)

    Hi @jonsisk,

    Thanks for reaching out!

    This is a bit strange, are you using the default WooCommerce coupons feature found under WordPress Dashboard > Marketing > Coupons?

    Could you please share a copy of your site’s System Status? You can find it via WooCommerce > Status. Select “Get system report” and then “Copy for support”. Once you’ve done that, paste it here in your response.

    Also, please share a copy of any fatal error log found under WooCommerce > Status > Logs (if available).

    We look forward to your response.

    Thread Starter jonsisk

    (@jonsisk)

    Thanks so much for your response!

    We are using the default WC coupons, although I do have an add in that for automatic quantity discounts. However the problem still exists if I disable all plugins except WooCommerce and switch to twentytwentytwo theme

    No errors in the status logs, here is the System report:

    
    ### WordPress Environment ###
    
    WordPress address (URL): https://www.pebc.org
    Site address (URL): https://www.pebc.org
    WC Version: 6.2.1
    REST API Version: ✔ 6.2.1
    WC Blocks Version: ✔ 6.7.3
    Action Scheduler Version: ✔ 3.4.0
    WC Admin Version: ✔ 3.1.0
    Log Directory Writable: ✔
    WP Version: 5.9.1
    WP Multisite: –
    WP Memory Limit: 512 MB
    WP Debug Mode: –
    WP Cron: ✔
    Language: en_US
    External object cache: ✔
    
    ### Server Environment ###
    
    Server Info: Apache
    PHP Version: 7.4.26
    PHP Post Max Size: 100 MB
    PHP Time Limit: 3600
    PHP Max Input Vars: 10000
    cURL Version: 7.58.0
    OpenSSL/1.1.1
    
    SUHOSIN Installed: –
    MySQL Version: 5.7.36-39-log
    Max Upload Size: 50 MB
    Default Timezone is UTC: ✔
    fsockopen/cURL: ✔
    SoapClient: ✔
    DOMDocument: ✔
    GZip: ✔
    Multibyte String: ✔
    Remote Post: ✔
    Remote Get: ✔
    
    ### Database ###
    
    WC Database Version: 6.2.1
    WC Database Prefix: wp_
    Total Database Size: 365.09MB
    Database Data Size: 358.03MB
    Database Index Size: 7.06MB
    wp_woocommerce_sessions: Data: 0.05MB + 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_order_items: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    wp_woocommerce_order_itemmeta: Data: 0.05MB + Index: 0.03MB + Engine InnoDB
    wp_woocommerce_tax_rates: Data: 0.02MB + Index: 0.06MB + Engine InnoDB
    wp_woocommerce_tax_rate_locations: Data: 0.02MB + Index: 0.05MB + Engine InnoDB
    wp_woocommerce_shipping_zones: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    wp_woocommerce_shipping_zone_locations: Data: 0.02MB + Index: 0.05MB + Engine InnoDB
    wp_woocommerce_shipping_zone_methods: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    wp_woocommerce_payment_tokens: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    wp_woocommerce_payment_tokenmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    wp_woocommerce_log: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    wp_actionscheduler_actions: Data: 0.08MB + 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.06MB + Index: 0.03MB + Engine InnoDB
    wp_commentmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    wp_comments: Data: 0.02MB + Index: 0.09MB + Engine InnoDB
    wp_gf_addon_feed: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    wp_gf_draft_submissions: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    wp_gf_entry: Data: 0.14MB + Index: 0.03MB + Engine InnoDB
    wp_gf_entry_meta: Data: 0.30MB + Index: 0.28MB + Engine InnoDB
    wp_gf_entry_notes: Data: 0.11MB + Index: 0.03MB + Engine InnoDB
    wp_gf_form: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    wp_gf_form_meta: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    wp_gf_form_revisions: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    wp_gf_form_view: Data: 0.08MB + Index: 0.03MB + Engine InnoDB
    wp_gf_rest_api_keys: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    wp_gla_budget_recommendations: Data: 0.22MB + Index: 0.14MB + Engine InnoDB
    wp_gla_merchant_issues: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    wp_gla_shipping_rates: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    wp_gla_shipping_times: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    wp_layerslider: Data: 0.09MB + Index: 0.00MB + Engine InnoDB
    wp_layerslider_revisions: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    wp_links: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    wp_mailchimp_carts: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    wp_mailchimp_jobs: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    wp_options: Data: 3.36MB + Index: 0.09MB + Engine InnoDB
    wp_pmxe_exports: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    wp_pmxe_google_cats: Data: 0.39MB + Index: 0.00MB + Engine InnoDB
    wp_pmxe_posts: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    wp_pmxe_templates: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    wp_postmeta: Data: 342.52MB + Index: 1.95MB + Engine InnoDB
    wp_posts: Data: 3.47MB + Index: 0.33MB + Engine InnoDB
    wp_ppress_forms: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    wp_ppress_formsmeta: Data: 0.06MB + Index: 0.05MB + Engine InnoDB
    wp_ppress_meta_data: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    wp_redirection_404: Data: 0.47MB + Index: 0.25MB + Engine InnoDB
    wp_redirection_groups: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    wp_redirection_items: Data: 0.02MB + Index: 0.09MB + Engine InnoDB
    wp_redirection_logs: Data: 0.02MB + Index: 0.05MB + Engine InnoDB
    wp_stream: Data: 0.11MB + Index: 0.13MB + Engine InnoDB
    wp_stream_meta: Data: 1.02MB + Index: 1.30MB + 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.05MB + Index: 0.02MB + Engine InnoDB
    wp_term_taxonomy: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    wp_toolset_post_guid_id: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    wp_usermeta: Data: 0.11MB + Index: 0.06MB + Engine InnoDB
    wp_users: Data: 0.02MB + Index: 0.05MB + Engine InnoDB
    wp_vxcf_sales: Data: 0.05MB + Index: 0.02MB + Engine InnoDB
    wp_vxcf_sales_accounts: Data: 0.03MB + Index: 0.00MB + Engine InnoDB
    wp_vxcf_sales_log: Data: 0.09MB + Index: 0.02MB + 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_rate_limits: Data: 0.02MB + Index: 0.02MB + 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_wdr_order_discounts: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    wp_wdr_order_item_discounts: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    wp_wdr_rules: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    wp_wpforms_entries: Data: 0.13MB + Index: 0.02MB + Engine InnoDB
    wp_wpforms_entry_fields: Data: 0.08MB + Index: 0.05MB + Engine InnoDB
    wp_wpforms_entry_meta: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    wp_wpforms_tasks_meta: Data: 1.52MB + Index: 0.00MB + Engine InnoDB
    wp_wpsd_stripe_donation: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    wp_yoast_indexable: Data: 1.52MB + Index: 0.28MB + Engine InnoDB
    wp_yoast_indexable_hierarchy: Data: 0.02MB + Index: 0.05MB + Engine InnoDB
    wp_yoast_migrations: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    wp_yoast_primary_term: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    wp_yoast_seo_links: Data: 0.25MB + Index: 0.17MB + Engine InnoDB
    wp_yoast_seo_meta: Data: 0.31MB + Index: 0.00MB + Engine InnoDB
    
    ### Post Type Counts ###
    
    acf-field: 19
    acf-field-group: 4
    astra-advanced-hook: 14
    attachment: 875
    awsm_team: 2
    awsm_team_member: 43
    custom_css: 2
    event_listing: 37
    event_registration: 2
    fl-builder-template: 35
    fl-theme-layout: 2
    mc4wp-form: 1
    nav_menu_item: 50
    page: 57
    podcast: 54
    popup: 3
    popup_theme: 8
    post: 166
    product: 11
    revision: 7
    shop_coupon: 10
    shop_order: 20
    test: 1
    ticket-meta-fieldset: 3
    tribe_events: 23
    tribe_organizer: 1
    tribe_venue: 4
    tribe_wooticket: 24
    wp-timeline: 20
    wpforms: 5
    wptl_scbd: 2
    
    ### Security ###
    
    Secure connection (HTTPS): ✔
    Hide errors from visitors: ✔
    
    ### Active Plugins (40) ###
    
    Event Tickets: by The Events Calendar – 5.3.0.1
    AddToAny Share Buttons: by AddToAny – 1.8.4
    Advanced Custom Fields PRO: by Delicious Brains – 5.12
    Astra Pro: by Brainstorm Force – 3.6.6
    Premium Starter Templates: by Brainstorm Force – 3.1.6
    The SEO Framework: by The SEO Framework Team – 4.2.3
    AWSM Team Pro: by AWSM Innovations – 1.10.2
    Basic User Avatars: by Stranger Studios – 1.0.6
    Beaver Builder Plugin (Agency Version): by The Beaver Builder Team – 2.5.2.1
    Beaver Builder Sticky Column: by Sitespot Dev – 1.5.4
    Beaver Themer: by The Beaver Builder Team – 1.4.0.2
    Ultimate Addons for Beaver Builder: by Brainstorm Force – 1.34.4
    Classic Editor: by WordPress Contributors – 1.6.2
    Cookie Notice & Compliance for GDPR / CCPA: by Hu-manity.co – 2.2.3
    Custom Post Type UI: by WebDevStudios – 1.10.2
    Disable Comments: by WPDeveloper – 2.3.3
    Yoast Duplicate Post: by Enrico Battocchi & Team Yoast – 4.4
    Edit Author Slug: by Brandon Allen – 1.8.4
    Event Tickets Plus: by The Events Calendar – 5.4.0
    Google XML Sitemaps: by Auctollo – 4.1.1
    Intuitive Custom Post Order: by hijiri – 3.1.3
    MC4WP: Mailchimp for WordPress: by ibericode – 4.8.7
    Menu Image: by Freshlight Lab – 3.0.8
    Open External Links in a New Window: by WebFactory Ltd – 1.42
    PDF Embedder: by WP PDF Embedder Team – 4.6.4
    PEBC Events Add-ons: by Jon Sisk – 2022.01.11.1
    Popup Maker: by Popup Maker – 1.16.4
    Redirection: by John Godley – 5.2.3
    Regenerate Thumbnails: by Alex Mills (Viper007Bond) – 3.1.5
    Stream: by XWP – 3.9.0
    The Events Calendar: by The Events Calendar – 5.14.0.4
    Woo Discount Rules: by Flycart – 2.3.13
    WooCommerce Stripe Gateway: by WooCommerce – 6.2.0
    WooCommerce: by Automattic – 6.2.1
    WP Timeline: by ExThemes – 3.5
    WPForms Salesforce: by WPForms – 1.0.3
    WPForms Signatures: by WPForms – 1.3.1
    WPForms Zapier: by WPForms – 1.3.0
    WPForms: by WPForms – 1.7.2.2
    Zapier for WordPress: by Zapier – 1.0.2
    
    ### Inactive Plugins (0) ###
    
    ### Dropin Plugins (2) ###
    
    advanced-cache.php: advanced-cache.php
    object-cache.php: Memcached Redux
    
    ### Must Use Plugins (6) ###
    
    Force Strong Passwords - WPE Edition: by Jason Cosper – 1.8.0
    WPE ElasticPress Autosuggest Logger: by WP Engine – 1.0.0
    WP Engine Cache Plugin: by WP Engine – 1.0.8
    WP Engine Seamless Login Plugin: by WP Engine – 1.5.5
    WP Engine Security Auditor: by wpengine – 1.0.10
    WP Engine System: by WP Engine – 5.0.1
    
    ### Settings ###
    
    API Enabled: –
    Force SSL: –
    Currency: USD ($)
    Currency Position: left
    Thousand Separator: ,
    Decimal Separator: .
    Number of Decimals: 2
    Taxonomies: Product Types: event_ticket (event_ticket)
    external (external)
    grouped (grouped)
    simple (simple)
    variable (variable)
    
    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: #3334 - /shop/
    Cart: #3335 - /cart/
    Checkout: #3336 - /checkout/
    My account: #3337 - /my-account/
    Terms and conditions: ❌ Page not set
    
    ### Theme ###
    
    Name: pebc
    Version: 1.0.0
    Author URL: http://wpastra.com/about/
    Child Theme: ✔
    Parent Theme Name: Astra
    Parent Theme Version: 3.7.9
    Parent Theme Author URL: https://wpastra.com/about/?utm_source=theme_preview&utm_medium=author_link&utm_campaign=astra_theme
    WooCommerce Support: ✔
    
    ### Templates ###
    
    Overrides: astra-child-pebc/woocommerce/emails/customer-processing-order.php
    
    ### Action Scheduler ###
    
    Complete: 127
    Oldest: 2022-02-07 11:11:06 -0700
    Newest: 2022-03-08 08:56:42 -0700
    
    Failed: 2
    Oldest: 2021-07-15 11:46:18 -0600
    Newest: 2021-07-15 11:46:18 -0600
    
    Pending: 6
    Oldest: 2022-03-09 00:42:00 -0700
    Newest: 2022-03-14 03:57:55 -0600
    
    ### Status report information ###
    
    Generated at: 2022-03-08 10:28:25 -07:00
    
    Thread Starter jonsisk

    (@jonsisk)

    Here is a more detailed description of the issue:

    1. Create a new coupon code using the button (all uppercase)<br>
    2. See that the coupon exists (but listed in lowercase)<br>
    3. In the database, coupon’s post_title is all uppercase<br>
    4. Coupon code doesn’t work, entered in upper or lowercase<br>
    5. Change the post_title in the database to all lower case<br>
    6. Now coupon code works, both upper and lowercase<br>

    `

    Hi @jonsisk!

    Thank you for the detailed explanation.

    I tried to reproduce the issue on my local test site, only with Storefront and WooCommerce installed. I created a coupon code with all uppercase letters and, as you said, confirmed that the coupon code transforms then into lowercase letters.

    However, the coupon code still works no matter how you enter it (uppercase or lowercase) without editing the database.

    Uppercase letter.

    Lowercase letter.

    Could you please try deactivating all plugins except WooCommerce and changing your theme back to Storefront and then create a new test coupon code to see if the issue persists?

    If that doesn’t help, please try clearing your site cache and your cache plugins and check again if the issue persists.

    You can take a look at this guide for pointers:
    https://www.wpbeginner.com/beginners-guide/how-to-clear-your-cache-in-wordpress/

    Let us know how it goes!

    Thread Starter jonsisk

    (@jonsisk)

    Thanks so much for your effort helping me troubleshoot! The problem did persist with all plugins disabled and the storefront theme. I did spin up a fresh local WP install and didn’t have any issues so it must just be something lurking in the database or encoding / language / who knows what. But at least we’ve got a workaround for this site and thank you so much again for your suggestions! WooCommerce rules 🙂

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘New coupon codes do not work’ is closed to new replies.