• Resolved giac

    (@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

    (@wildprogrammers)

    Hi,

    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

    Thread Starter giac

    (@giac)

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

    Plugin Author wildprogrammers

    (@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 https://gist.github.com/WildCoders/6ca086d2f4b491b04c4cada403cd2fbe

    Let me know if you need anything else.

    Thanks & Regards
    WildProgrammers

    Thread Starter giac

    (@giac)

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

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

    (@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.

    Thread Starter giac

    (@giac)

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

    Plugin Author wildprogrammers

    (@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.