Home > Docs > Smart Coupons for WooCommerce > Smart Coupons for WooCommerce – Troubleshooting Guide

Smart Coupons for WooCommerce – Troubleshooting Guide

Last updated on August 22, 2023

Smart Coupon for WooCommerce is a versatile and powerful plugin with the capacity to transform the landscape of any e-commerce website by offering a wide array of coupon configurations to suit various user requirements. However, even the most robust tools can encounter unexpected hitches that momentarily interrupt the plugin’s seamless performance. This article is a comprehensive troubleshooting guide to help you address and resolve common coupon-related issues.

Encountering difficulties when attempting to save settings. This issue mainly arises when the WordPress nonce gets expired. A WordPress nonce is a “number used once” security token to protect URLs and forms from malicious attacks. It helps WordPress to determine whether a request is valid, preventing unauthorized actions and inputs.

Solution

Try refreshing the page.

If you’re experiencing issues with your My account’s coupons page not working properly, it could be due to the rewrite rules not getting flushed.

Solution

To resolve the issue and restore the functionality of your coupons page, follow these steps:

  • From the WordPress dashboard, navigate to Settings > Permalinks.
  • On the Permalinks settings page, you’ll see various options for your permalink structure.
  • Choose an alternative permalink structure. This change is temporary and aims to trigger a rewrite rule flush.
  • Click the Save Changes button to apply the modified permalink structure.
  • After saving the changes, return to the Permalinks settings page.
  • Select your original permalink structure—the one you were using before facing the issue.
  • Click on the Save Changes button once more to revert to your original permalink structure.

After following the above-mentioned steps, revisit your coupons page to check if it’s now functioning correctly.

Unable to configure your coupon banner, or the settings are not having the desired effect. This situation can occur due to:

  • An issue with the associated coupon.
  • Auto inject feature disabled.
Solution
Check 1: Verify coupon details
  • Check if the associated coupon exists in your system.
  • Make sure to set the coupon’s status to Published in order to make it visible to customers.
  • Verify that the coupon’s start date has been reached, as banners will not display for coupons that are not yet active.
Check 2: Configure coupon display pages
  • Review the settings related to where the coupon banner should be displayed from Smart coupons > General setting > Coupon banner.
  • Make sure you’ve selected the appropriate pages or sections where the banner should appear from the Pages to show coupon banner section.
Check 3: Enable auto-inject banner
  • Navigate to Smart coupons > General setting > Coupon banner.
  • Check if the Inject the banner automatically option is configured as yes. If not, set the option to Yes. This option automatically displays the coupon banner where you’ve configured it.
  • Otherwise, you will need to add the given code snippet to automatically display the coupon banner.

After making changes to your coupon banner settings, preview the associated pages to ensure the banner is displaying correctly.

Encountering issues with coupons not being automatically applied during the checkout process. The most common reasons behind this issue are:

Reason 1: Coupon ineligibility
  • The specific coupon may not be eligible for the items in the current cart.
  • The coupon restrictions or conditions may not be met based on cart conditions, minimum purchase amount, product categories, etc.
Solution
  • Review the coupon restrictions and conditions set for the coupon in question.
  • Ensure that the items in the cart fulfill these conditions for the coupon to be applied automatically.
  • If necessary, modify the coupon restrictions to better align with your intended usage.
Reason 2: Maximum auto-apply coupons limit
  • By default, the maximum number of coupons that can be applied automatically is set to 5 to reduce memory usage and make the site faster.
  • Check if your site has more than 5 auto-coupons configured. If the current coupon is not among the first five in the auto-coupon list, it might not be applied automatically.
Solution

You can use the wt_smartcoupon_max_auto_coupons_limit filter to increase the maximum limit of automatically applied coupons to any number of your choice. To use the filter:

  • From the WordPress dashboard, navigate to Appearance > Theme File Editor.
  • Locate the Theme functions (functions.php) file.
  • Add the below code snippet to the end of the text editor.

After implementing the appropriate fixes, proceed with a test purchase to verify if the coupon is now being automatically applied as intended. For further details refer to this article.

Coupons are not being displayed in the cart or checkout pages may occur due to a couple of reasons.

Reason 1: Missing display setting

The coupons may not be configured to be displayed in the cart or checkout pages.

Solution
  • Navigate to Coupon edit page of the corresponding coupon.
  • Scroll down to Coupon data meta box.
  • In the General tab, ensure the pages that should display the coupons are selected under the Display coupon in section.
Reason 2: Theme missing necessary hooks

Your theme might not have the required hooks to inject coupons into the cart and checkout layouts.

Solution

This can be resolved by altering the theme file with the necessary hooks.

  • Consider creating a child theme, if you haven’t already, to avoid modifying the parent theme directly.
  • In your child theme’s functions.php or relevant template files, add the necessary hooks to display coupons:
    • Use woocommerce_after_cart_table hook to inject coupons into the cart page.
    • Use woocommerce_before_checkout_form hook to display coupons on the checkout page.

After applying the fixes, view the cart and checkout pages to confirm that the coupons are now properly displayed in their designated sections.

The Click to apply coupon function is not working as expected is a rare issue which may occur due to a couple of reasons:

Reason 1: JavaScript conflict

There might be conflicts between the JavaScript used for the coupon application and your theme or other active plugins. To confirm the issue:

Solution

Check 1: Temporarily switch to a default WordPress theme (such as Twenty-Twenty).

  • If the content appears with the default theme, there’s likely a conflict with the theme.

Check 2: Deactivate all other plugins except WooCommerce and test the Click to Apply Coupon functionality.

  • If working, there’s likely a conflict with one of the plugins. Gradually reactivate plugins to identify the conflicting ones.

Reach out to our support for further assistance.

Reason 2: Background Request Error

Background requests made during the coupon application process could be encountering errors, preventing the application.

Solution

Access the error logs to identify any issues related to background requests during coupon application.

Reach out to our support for further assistance.

Email-restricted coupons seem to be applying to customers who are not the intended recipients. The issue you’re experiencing is likely related to how email validation is performed in the context of coupon usage. The email validation for restricted coupons is typically carried out during the final checkout process, right before the payment.

Solution

No specific actions are needed. Since the email validation occurs only at the last step of the checkout process, any coupons that don’t meet the email restriction criteria will be automatically removed when the customer proceeds to checkout.

The store credit product page is blank, without any content.

Reason 1: Templates unselected

The template option might be enabled for store credit products, but you haven’t chosen any templates.

Solution
  • From the WordPress dashboard, navigate to Smart Coupons > Store credit > Gift card templates.
  • Select one or more templates to display on the store credit product page.
  • Refresh the store credit product page.
Reason 2: Necessary hooks missing

The theme you’re using might not have the necessary hook to render the content on store credit product pages.

Solution

You can either edit the theme and add the necessary hooks or you can choose to use an alternative theme with the hooks. To edit the theme:

  • If you’re not already using a child theme, consider creating one to avoid directly modifying the parent theme.
  • Edit your child theme’s functions.php file or relevant template files.
  • Add the hook, woocommerce_before_single_product_summary, to ensure that content is properly displayed on the store credit product page.

After applying the fixes, navigate to your store credit product page to verify that it’s now displaying the expected content without any blanks.

Store credit emails are not being received by customers as expected. This issue may occur due to a couple of reasons.

Reason 1: Scheduled date is not reached

If you’ve set a scheduled date for sending store credit emails, and that date has not been reached, the emails won’t be sent until then.

Solution

If a scheduled date has been set for sending store credit emails, be patient and wait for that date to arrive.

Reason 2: Configured order status not reached

Store credit emails might be triggered upon reaching a specific order status, and if that status is not reached, the emails won’t be sent.

Solution
  • Review the order status configurations for triggering store credit emails.
  • Make sure that the configured order status aligns with your desired workflow.
Reason 3: Incorrect server mail settings

Incorrect mail server settings could prevent emails from being sent and received.

Solution

Check: Install a mail logger plugin to track outgoing emails and confirm whether the emails are being correctly logged in the mail logger plugin.

  • If you observe issues in the mail logger or suspect incorrect server mail settings, reach out to your server team.
  • They can help you verify and correct the mail settings to ensure successful email delivery.

The plugin setting tabs appear blank, without any content visible. This is most probably a conflict between JavaScript used by the plugin and your theme or other active plugins.

Solution

Check 1: Temporarily switch to a default WordPress theme (such as Twenty-Twenty).

  • If the content appears with the default theme, there’s likely a conflict with the theme.

Check 2: Deactivate all other plugins except WooCommerce and verify if the settings are visible.

  • If visible, there’s likely a conflict with one of the plugins. Gradually reactivate plugins to identify the conflicting ones.

Reach out to our support for further assistance.

Your issue is not on the list..?

If you continue to experience difficulties, feel free to contact our support team. Provide them with the error details to receive additional help and guidance.