Hi @rvd1993,
Thank you for reaching out and for clearly explaining what you need help with.
To change the text you mentioned, you can either use custom code or a plugin like Loco Translate. Please note that providing custom code is outside the scope of support offered in this forum. For advanced customization, it’s best to consult an expert from platforms like Codeable.io, who can assist you with the necessary code adjustments.
If you’d prefer not to use code, you can use Loco Translate to modify text on your website. However, this method is less flexible and may not be as clean or reliable as using custom code.
If you’re comfortable working with code, here’s an example of how you can make the changes:
Change “Aanbieding!” (Sale!)
add_filter( 'woocommerce_sale_flash', 'custom_woocommerce_sale_flash' );
function custom_woocommerce_sale_flash( $text ) {
return '<span class="onsale">Promo!</span>'; // Replace "Promo!" with your desired word
}
Change “Toevoegen aan winkelwagen” (Add to cart)
add_filter( 'woocommerce_product_add_to_cart_text', 'custom_add_to_cart_text' );
add_filter( 'woocommerce_product_single_add_to_cart_text', 'custom_add_to_cart_text' );
function custom_add_to_cart_text( $text ) {
return 'Toevoegen'; // Your preferred text
}
You’ll need to add this code to your functions.php file or use a code snippet plugin. If the code doesn’t work as expected, you may need to adjust it slightly to fit your theme or setup.
If you’re not comfortable editing code, please use the Loco Translate option or consult an expert, as further customization requests are beyond the scope of forum support.
If you found this response helpful, I’d really appreciate it if you could leave a quick review here:
👉 https://wordpress.org/support/plugin/woocommerce/reviews/#new-post