Hello Mike,
here you are
if ( defined( 'YITH_YWRAQ_FREE_INIT' ) ) {
add_filter( 'yith_ywraq_product_added_to_list_message', 'yith_ywraq_change_product_added_string' );
function yith_ywraq_change_product_added_string() {
return "Your custom sentence";
}
}
Add this code inside the functions.php of your file and change the “Your custom sentence” string.
Hi Emanuela,
Which of these two files do we have to update?
/public_html/wp-content/plugins/yith-woocommerce-request-a-quote/plugin-fw/yit-functions.php
/public_html/wp-content/plugins/yith-woocommerce-request-a-quote/includes/functions.yith-request-quote.php
Regards,
Mike
Hi, could you tell us exactly which functions.php file that we have to update.
Thanks
Hi @optimized,
It’s the functions.php
file of your active theme. We strongly recommend using a Child Theme but if you don’t have one, you can use a Code Snippets plugin alternatively.
Hi Carlos,
I added the code to the main theme functions.php file to make a test but this is the PHP Fatal Error that’s showing up in the logs:
PHP Fatal error: Cannot redeclare yith_ywraq_change_product_added_string() (previously declared in /home/cranehire/public_html/wp-content/plugins/code-snippets/php/snippet-ops.php(469) : eval()’d code:4) in /home/cranehire/public_html/wp-content/themes/renovate/functions.php on line 961
So it looks like the code you gave you, the issue is it’s declaring a function that’s already used elsewhere by the code snippets plugin, and trying to declare it twice throws the error`
How can we fix this?
Thanks,
Mike