This topic has 4 replies, 2 voices, and was last updated 2 years, 4 months ago ago by Rose Tyler
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,
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
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,
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;
}
Regards
Tagged: hook, json, label, product status filter, themes, woocommerce, wordpress
You must be logged in to reply to this topic.Log in/Sign up