I keep searching in the documents to update some items but haven't seen the full plugin docs to fix things on my own! But I need to change the Switch to Agent button title text to Switch to Sales Rep, when a sales rep is shopping as a customer.
I don't see any other buttons for Agents. I appreciate the help.
To change that text there, you can add the following PHP code snippet to your site:
add_filter('gettext', 'change_agent_text', 20, 3);
function change_agent_text($translated, $original, $domain) {
if ($original === 'Switch to Agent') {
return 'Switch to Sales Rep';
}
return $translated;
}
This can be added to functions.php or to any code snippets plugin.
If necessary, you can extend this code, and add additional texts, for example:
add_filter('gettext', 'change_agent_text', 20, 3);
function change_agent_text($translated, $original, $domain) {
if ($original === 'Switch to Agent') {
return 'Switch to Sales Rep';
}
if ($original === 'Your text here 1...') {
return 'Another text here 1...';
}
if ($original === 'Your text here 2...') {
return 'Another text here 2...';
}
return $translated;
}
Hello,
I keep searching in the documents to update some items but haven't seen the full plugin docs to fix things on my own! But I need to change the Switch to Agent button title text to Switch to Sales Rep, when a sales rep is shopping as a customer.
I don't see any other buttons for Agents. I appreciate the help.
Attached files: Switch Button Update.pdf
Hello Matthew,
To change that text there, you can add the following PHP code snippet to your site:
This can be added to functions.php or to any code snippets plugin.
If necessary, you can extend this code, and add additional texts, for example:
Kind regards,
Stefan