Hook for Product Status Filter widget to change label

This topic has 4 replies, 2 voices, and was last updated 1 years, 8 months ago ago by Rose Tyler

  • Avatar: goducks
    goducks
    Participant
    July 27, 2022 at 21:09

    Hello,

    I am looking for a particular hook to control the front-end display on one of your widgets, product status filter.

    Currently, we have directly edited the plugin code, located at:
    public_html/wp-content/plugins/et-core-plugin/app/models/widgets/product-status-filter.php – Line 135

    We would like a function that changes the label from ‘On Sale’ to ‘Clearance’ that we can put in our functions.php file in our child theme.

    Thank you,

    3 Answers
    Avatar: Rose Tyler
    Rose Tyler
    Support staff
    July 28, 2022 at 10:44

    Hello,

    If you just need to change text, do not edit files, install Loco translate plugin, create a translation for Core plugin > https://prnt.sc/KVCLhh3sQZ_D , then you can disable the Loco plugin.

    Regards

    Avatar: goducks
    goducks
    Participant
    August 5, 2022 at 01:24

    Hi,

    We do not wish to edit core files. We would prefer to use a hook that we can use in our child theme function.php.

    This is the least resource intensive and doesn’t require installing a plugin for such a small change.

    Can you tell me if there is a hook available on that widget or help me to figure out how to find it myself?

    Thank you very much,

    Avatar: Rose Tyler
    Rose Tyler
    Support staff
    August 5, 2022 at 14:29

    Hello,

    There is no such hook.
    As was mentioned, you can disable and delete the Loco plugin once the text will be changed.
    Or use can use custom CSS code (Theme Options > Theme custom CSS):

    .etheme-ajax-filter.etheme-sale-filter {
    font-size: 0;
    }
    .etheme-ajax-filter.etheme-sale-filter:after {
    content: 'My custom text';
    font-size: 1.14rem;
    }

    https://prnt.sc/jZl2-G5JJmlv

    Regards

  • Viewing 4 results - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.Log in/Sign up

We're using our own and third-party cookies to improve your experience and our website. Keep on browsing to accept our cookie policy.