- This topic has 1 reply, 2 voices, and was last updated 8 years ago by .
Viewing 2 posts - 1 through 2 (of 2 total)
Viewing 2 posts - 1 through 2 (of 2 total)
- You must be logged in to reply to this topic.
Support site for Tips and Tricks HQ premium products
by
Tips and Tricks HQ Support Portal › Forums › WP eStore Forum › Change default text in shopping cart widget
Tagged: customize, Language, shopping cart, Tweaks, WP eStore
I need to change the default shopping cart text “I want to pick up from store” to something else (there will be local pickup, but it’s not a store). Is there a way to do this outside of the plugin language file so that it doesn’t get overwritten when the plugin gets updated?
Thanks!
The following technique allows you to customize any text that is visible to your customers:
You should keep a backup copy of your language file (if you end up changing some of texts). That way, you can just put that back in (overwrite the file with your own copy) after an update.
There is another option that you can do which won’t require you to update the language file.
You can keep your customized copy of the language file in a different folder (outside the plugin folder). Then use the following code to load it (uses the eStore_language_loading_override filter). You would add the following code to your theme’s functions.php file
add_filter('eStore_language_loading_override', 'load_my_custom_language');
function load_my_custom_language()
{
$language_file = "/path/to/your/custom/language/file/lang.php";
include_once($language_file);
return "custom-file-loaded";
}
This way the plugin will always load your custom language file from your custom folder (so the one inside the plugin folder doesn’t matter).