Hello Guys,
Ik try to change the Woocommerce words Aanbieding! in the CSS.
Like sale! in english. Because it is throuhg my text.
Looked through al the files, can’t find it anywhere?
I found this, but that gives me an error?
<?php
function prefix_woocommerce_sale_flash( $text ) {
$text = ‘<span class=”onsale”>’. __( ‘Action!’, ‘text_domain’ ). ‘</span>’;
return $text;
}
add_filter( ‘woocommerce_sale_flash’, ‘prefix_woocommerce_sale_flash’ );
Can you please help me out?
Thank You,
Lianne
Hey Lianne,
Thank you for sharing the above filter, I was able to correct the errors by correcting the quotes.
Try adding this code to the end of your functions.php file in Appearance > Editor:
function prefix_woocommerce_sale_flash( $text ) {
$text = '<span class="onsale">'. __( 'Action!', 'text_domain' ). '</span>';
return $text;
}
add_filter( 'woocommerce_sale_flash', 'prefix_woocommerce_sale_flash' );
I tested this on my localhost and it seems to work, please check.
Best regards,
Mike
Hi Mike,
Thanks for the answer, unfortuantly it doesn’t work for me or I did it in a wrong way.
Could you please look at my theme editor?
Very strange, I tried it another time and it worked!!!!
So it’s solved :-)
Thank you,
Lianne
Hi,
Glad to hear it’s solved, unless there is anything else we can help with on this issue, shall we close this then?
Best regards,
Mike
Yes Mike it’s Oke to close. Thanxs again👍
Hi,
Glad we were able to help, we will close this now. Thank you for using Enfold.
For your information, you can take a look at Enfold documentation here
For any other questions or issues, feel free to start new threads in the Enfold forum and we will gladly try to help you :)
Best regards,
Mike