• Resolved ixpr

    (@ixpr)


    Hi there!

    We have come across some very unpleasant issue with X-Currency that we are not able to fix. Namely, we cannot use coupons that have “Exclude sale items” restriction, because when X-Currency plugin is enabled this restriction simply doesn’t work as it’s supposed. Namely, when the restriction is active and we have a non-sale item in cart, the coupon doesn’t work as well as when we have a sale item in the cart. That has been checked and rechecked. When we switch off X-Currency everything starts to work fine again.

    We started research by ourselves and that’s what we have found out. X-Currency somehow changes the sale price of all items that are not on sale to “0” instead of empty value “”. And that is really crucial for Woocommerce, because in the function that checks whether a product is on sale it has the following condition in /includes/abstracts/abstract-wc-product.php:

    public function is_on_sale( $context = 'view' ) {

    if ( '' !== (string) $this->get_sale_price( $context ) && $this->get_regular_price( $context ) > $this->get_sale_price( $context ) ) {

    $on_sale = true;

    The condition '' !== (string) $this->get_sale_price( $context ) is always true because the sale price is really “0” and not “”!

    Please advise, how could this be treated and fixed? Unfortunately we cannot use your plugin because of this small issue. Can it be fixed in the next updates?

    Thanks in advance!

    best regards,
    Michael

    • This topic was modified 2 months, 2 weeks ago by ixpr.
Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Md Al Amin

    (@mdalaminbey)

    @ixpr Thank you for reporting this issue in detail. We’ve reviewed your findings and understand the problem. It appears that X-Currency is incorrectly setting the sale price to “0” for non-sale items, which affects WooCommerce’s coupon logic.

    We will work on fixing this and aim to include the update as soon as possible. We appreciate your patience and for bringing this to our attention.

    Plugin Author Md Al Amin

    (@mdalaminbey)

    @ixpr Thanks again for your detailed report! We’re happy to confirm that we’ve fixed the issue in our latest version.

    Thread Starter ixpr

    (@ixpr)

    Hi!

    Thanks for a quick response and fix!

    Still, the problem persists even after upgrading to version 2.2.2 – we’ve tested it through, but alas the issue is still with us. After deactivating X-Currency coupons apply correctly.

    best regards,
    Michael

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

You must be logged in to reply to this topic.