Support » Plugin: Category Discounts for WooCommerce » Remove brackets from discount expiry

  • Resolved giac


    Hi there, thanks for the great plugin, we removed the brackets from the discount expiry date label modifying the plugin core, of course it will be lost at the next update, is there any way to make this mod permanent?

    This is the part of the code we edited in the file class-woo-cat-disc-public.php

    if (!empty($disc_data)) {

    $price = wc_get_price_to_display($product, array(‘price’ => $disc_data[‘price’]));
    $new_price = wc_get_price_to_display($product, array(‘price’ => $disc_data[‘disc_price’]));
    $disc_label = __(‘ ‘, ‘woocatdisc’) . $disc_data[‘disc_label’] . __(‘ ‘, ‘woocatdisc’);

    $price = wc_format_sale_price($price, $new_price) . $disc_label;

    this the original part

    (‘ ( ‘, ‘woocatdisc’) . $disc_data[‘disc_label’] . __(‘ ) ‘, ‘woocatdisc’);

    that was containing the opening and closing brackets, we’d like to keep this modification as for our case the brackets are not really needed.

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author wildprogrammers



    Thanks for getting in touch with us and we apologize to respond you this late as we were on vacation.

    For your issue, we can’t add it in the main plugin as this is your specific requirement. But yes, we have added a hook before returning the HTML and you can use that hook in your child theme’s function.php file to over-ride HTML as per your need. Hook name is “woo_cat_disc_lite_disp_price_html”.

    Hope I am clear enough 🙂

    Let me know if you need anything else. Also, we would like you to take a look at the premium version of our plugin as it has lot more functionality than the free version.

    Thanks & Regards

    Thanks for the answer! Would it be too much to ask to write down here the function?

    Plugin Author wildprogrammers


    You are welcome 🙂

    It won’t be that much if you can provide us 5 star rating 😉

    Assuming that you will give, we are providing code here. Please refer it from

    Let me know if you need anything else.

    Thanks & Regards

    Cheers mate, very helpful but it does not work, only the mod of the core file works 🙁

    • This reply was modified 2 years, 6 months ago by giac.
    Plugin Author wildprogrammers


    Have you re-downloaded the plugin..?

    I have added hook in newer version. And checked in my local and it seems to works.

    So can you please check once by re-downloading and testing again..?

    Let me know updates.

    Great THANKS!!! I re download on overwritten the plugin and all went as expected, great work and great help!!

    Plugin Author wildprogrammers


    Great to know that it worked 🙂

    We are also offering the premium version of the plugin with lot more functionality. We would like you to check that and buy if you think that it can be more helpful to you.

    Thanks in advance 🙂

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Remove brackets from discount expiry’ is closed to new replies.