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.
1. Unable to save settings(Error while saving settings)
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.
2. My account coupons page not working
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.
3. Unable to configure coupon banner
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.
4. Coupons are not getting applied automatically
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.
5. Coupons are not displaying on the cart/checkout pages
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.
- Use
After applying the fixes, view the cart and checkout pages to confirm that the coupons are now properly displayed in their designated sections.
6. Click to apply coupons not working
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.
7. Email-restricted coupons apply to other emails
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.
8. Blank Store Credit Product Page
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.
9. Not receiving store credit emails
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.
10. Blank plugin setting tabs
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.
brad
April 5, 2024
as soon as i enter a product restriction, and enter the only allowed category, i get an error at checkout saying “Sorry, this coupon is not applicable to selected products.”
I have entered the desired product catefory and nothing else on the backen (no desired specific products). thoughts?
Arjun
April 8, 2024
Hi brad,
Thanks for getting in touch. If you’ve configured category restrictions and assigned specific categories in the backend, please ensure that you’re applying the coupon to a product within those selected categories. The coupon will only apply to products within the designated categories. If you’re still encountering issues, don’t hesitate to contact our support team for further assistance.
Agricare
April 3, 2024
I have created a coupon by duplicating another coupon. Old coupon has usage limit 1 and it has been used once, same usage count is also wrongly transferred to the new coupon. So I have to increase usage limit of new coupon to 2 so that it can be used even once. Issue is not present when coupon is duplicated with smart coupon plugin disabled. There is no option to reset usage count also. Please tell how to fix this?
Arjun
April 8, 2024
Hi Agricare,
Thank you for reaching out. We’ve acknowledged the issue you’re experiencing, and our team has identified and resolved it. The fix will be available in plugin version 2.3.1 or later, ensuring smooth functionality. If you have any further concerns or questions, please don’t hesitate to contact our support team.
Robyn
September 30, 2023
I am trying to Buy X product get 10% off entire cart. I have implemented the below but am only getting 10% off the X product.
Discount Type: % discount
Amount: 10
Apply automatically
Product/Category restriction: selected
Product any: X product
Arjun
October 3, 2023
Hi Robyn,
Thank you for reaching out. To create a Buy X products and get 10% off entire cart coupon, follow the given configuration.
1. Set Discount type as Percentage discount.
2. Set the Coupon amount as 10.
3. Enable Apply automatically to apply the coupon automatically if eligible.
4. In Usage restrictions, disable Individual quantity restriction.
5. Scroll down and set Minimum quantity of matching products as X.