• Resolved Chozhan

    (@sreejithchozhan)


    Hi,

    I am using WooCommerce’s virtual coupon for a discount on a specific product. It works perfectly on the cart and checkout pages, but I’m encountering an issue on the WooCommerce order page where the coupon discount is applied to products even without the discount. The coupon and total amounts are correct, but the discount appears on products where it shouldn’t. How can I resolve this issue using code?

    The page I need help with: [log in to see the link]

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Support Shameem R. a11n

    (@shameemreza)

    Hi @sreejithchozhan,

    For better assistance, can you provide screenshots showing the issue on your end? For screenshots, you may use https://snipboard.io – please follow the instructions on that page, then paste the URL in this thread.

    Additionally, please can you share a copy of the following:

    • System Status Report: Navigate to WooCommerce → Status. Select Get System Report and then Download for Support.
    • Fatal Error log: Share a copy of any fatal error log found under WooCommerce → Status → Logs.

    You could copy and paste your reply or share it via Mozilla Community Pastebin and send the link here. This will help us investigate further and provide you with a more accurate solution.

    In the meantime, you can run a conflict test to help you identify the cause of the issue. More info: https://woo.com/document/how-to-test-for-conflicts/

    Let us know how that goes for you.

    Thread Starter Chozhan

    (@sreejithchozhan)

    Hi,

    Apologies for the delayed response. Kindly review the first screenshot where I applied a virtual coupon to two products, namely ‘Belt’ and ‘Cap,’ receiving a 50% discount. However, in the second screenshot of the WooCommerce order page, despite intending the virtual coupon for only these two products, it also affects the ‘Beanie’ product. Notably, the order total and coupon value are accurate.

    This issue persists when processing refunds. Our setup encountered this problem on our local server, and it persists on our live customer site.

    The system status report and fatal error log are attached for your reference to address this issue.

    Screenshot 1: https://snipboard.io/XB2lMr.jpg

    Screenshot 2: https://snipboard.io/XeGHs8.jpg

    System status report: https://prod.pastebin.prod.webservices.mozgcp.net/PUSFxsh0

    Fatal error log: https://snipboard.io/bxgl1v.jpg

    Hope you are considering my request.

    Thanks & Regards

    Hey @sreejithchozhan!

    Thank you for sharing more information!

    Do you mind sharing screenshots of all the settings on this coupon so we can try to replicate this issue on our end?

    Is this issue happening on only this coupon or with others too?

    Thank you!

    Looking forward to your reply.

    Have a wonderful day!

    Thread Starter Chozhan

    (@sreejithchozhan)

    Hi,

    This issue occurs specifically when we add a virtual coupon. Does WooCommerce distribute discounts to all products by default? I’m prepared to share screenshots related to this problem.

    Thanks

    Plugin Support Shameem R. a11n

    (@shameemreza)

    Hi @sreejithchozhan,

    The discount should only apply to the specific products you set in the coupon settings or the items in the cart. For example, a $50 coupon applied to a $40 product with a $10 Flat Rate shipping will only discount $40. The order will still cost $10.

    Please note that shipping rates are not cart items, so coupon discounts will not be applied to shipping.

    Detailed instructions can be found here: https://woo.com/document/coupon-management/

    To better assist you, we would need to see the settings of your virtual coupon. You mentioned you’re prepared to share screenshots related to this problem; please do so. This will help us to understand the issue better.

    In the meantime, I recommend disabling all other plugins and switching to a default theme (like Storefront) to see if the issue persists. If it does not, it will likely conflict with your theme or one of your plugins.

    Please let us know how you get on with these steps. We’re here to help.

    Thread Starter Chozhan

    (@sreejithchozhan)

    Hi,

    Apologies for the delayed response. We are not applying a flat rate. Could you please review the screenshot I previously shared? When we apply a coupon through specific items, for example, products in a specific category, the frontend works as expected. However, on the order page, the coupon discount is distributed to products that should not be affected, even though the total is correct. This becomes an issue when my client processes a refund. We are using the ‘woocommerce_get_shop_coupon_data’ hook for creating virtual coupons. I hope this clarifies my query.

    Thanks

    Hi there @sreejithchozhan ??

    Thank you for reaching back, clarifying things further.

    We are using the ‘woocommerce_get_shop_coupon_data’ hook for creating virtual coupons. I hope this clarifies my query.

    From what I gather, the hook is utilized in order for custom coupon objects to be created on the fly (hook reference inked here). Correct?

    Please note that we can’t provide support for code customization as per our support policy. Still, if you need customization, we do our best to offer advice and direct you to appropriate resources. Based on the feedback we get from our customers, we highly recommend contacting one of the services on our Customization page.

    I trust that points you in the right direction, but if you have more questions, let us know.

    We’re happy to help.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Woocommere Coupon’ is closed to new replies.