• Is there a way to check if the product is on discount with a plugin rule applied?
    I generally use: $product->is_on_sale() to check if there is a woocommerce discount.
    But this isn’t working with “Dynamic Pricing With Discount Rules”

    • This topic was modified 3 years, 9 months ago by xenio2000.
    • This topic was modified 3 years, 9 months ago by xenio2000.
Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Support ijas

    (@ijasacodez)

    ‘$product->is_on_sale()’, this wont work with our plugin, these are default woocommerce functions which will work only if the product is on sale (sale price is set in the woocommerce product page). Our plugin uses virtual coupons for applying discounts, the discounts are calculated individually based on the backend rules and sum total is applied as a virtual coupon (except for product based rules).
    Can you please tell us your requirement in detail.

    Thread Starter xenio2000

    (@xenio2000)

    I am using a custom code on functions.php to add a badge “SALE” under the price, this is working with standard discount applied via Woocommerce but it does not show for sale price managed via the plugin.

    The red badge “SCONTO” is triggered when $product->is_on_sale() is true.
    Screenshot.

    View post on imgur.com


    • This reply was modified 3 years, 9 months ago by xenio2000.
    • This reply was modified 3 years, 9 months ago by xenio2000.
    Plugin Support ijas

    (@ijasacodez)

    if you want to add badges to the discounted products (pricing rules), you can try our ‘Product Labels For Woocommerce (Sale Badges)’, this plugin allows to add badges to same product list you have Pricing Rules plugin..

    Thread Starter xenio2000

    (@xenio2000)

    I am already testing it but it does not work on details page of the product.
    Anyway I did it by myself, thanks.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘How to check if product is on sale with the plugin?’ is closed to new replies.