Hello there,
we hope you’re doing well!
What you comment is 100% related to your theme, and not to our plugin, sorry. We recommend contacting their support, they can surely help you better than us.
Have a nice day!
Thread Starter
ops159
(@ops159)
Who is this basket about? not with woocommerce.
Thread Starter
ops159
(@ops159)
@juaancmendez and problem Add to wishlist text ..
How can I translate the text next to the heart in the picture on individual product pages into a different language? I think it has to do with your plugin.
See pls Photo
-
This reply was modified 2 years, 3 months ago by ops159.
Hello there,
You can modify this text directly from Add to wishlist options > Text customization > “Add to wishlist” text, since being a setting of our plugin, it takes priority over any translation.
Check it out and tell us any news, please.
Best regards.
Thread Starter
ops159
(@ops159)
@juaancmendez dont work .. it only works in some places, but the text next to the heart on the single product page never changes
see picture please
Hello there,
That’s weird. Could you check if you don’t have the add-to-wishlist.php template overridden in wp-content/themes/your active theme/woocommerce ? If so, try renaming it momentarily and see if the string manages to translate correctly.
If this is not the case, you can change it by adding this code in the functions.php file of your active theme:
if ( ! function_exists( 'yith_wcwl_wishlist_change_atw_text' ) ) {
function yith_wcwl_wishlist_change_atw_text() {
$jquery = 'jQuery( function($) {
$( "body.single-product .single-main-content .yith-wcwl-add-to-wishlist:not(.exists) span" ).text( "Your turkish text" );
});';
wp_add_inline_script( 'jquery-yith-wcwl', $jquery );
wp_add_inline_script( 'jquery-yith-wcwl-user', $jquery );
}
add_action( 'wp_enqueue_scripts', 'yith_wcwl_wishlist_change_atw_text', 99 );
}
Check it out and tell us any news.
Best regards.
Thread Starter
ops159
(@ops159)
I couldn’t see the file you mentioned there. but this file exists
wishlist-view.php
and other filenames
picture 1
picture 2
Hello there,
That template is not related to the button and the text, but to the view of the wishlist and its items. Thanks for the image anyway.
Have you tried with the code we provided?
We will be attentive to your response.
Have a nice day!
Thread Starter
ops159
(@ops159)
@juaancmendez this code didn’t work. did not change.
Hello there,
The code works correctly for us from the console of your browser, anyway, try this new one:
if ( ! function_exists( 'yith_wcwl_wishlist_change_atw_text' ) ) {
function yith_wcwl_wishlist_change_atw_text() {
$jquery = 'jQuery( document ).ready(function($) {
$( "body.single-product .single-main-content .yith-wcwl-add-to-wishlist:not(.exists) span" ).text( "Your turkish text" );
});';
wp_add_inline_script( 'jquery-yith-wcwl', $jquery );
wp_add_inline_script( 'jquery-yith-wcwl-user', $jquery );
}
add_action( 'wp_enqueue_scripts', 'yith_wcwl_wishlist_change_atw_text', 9999 );
}
Let us know any news.
Best regards.
Thread Starter
ops159
(@ops159)