Add to Cart

Hi Guys,

I've been trying to change the Add to Cart button to something else but can't make it work for some reason. Maybe because it's translated in Spanish to "Añadir al Carrito". I was thinking maybe I can change it in the translated file but wouldn't know how...? 

I've pasted this snippet in my functions.php child theme and it first works with the text My Button Text but when I change it to anything else in Spanish it suddenly doesn't work anymore.

add_filter( 'add_to_cart_text', 'woo_archive_custom_cart_button_text' ); // < 2.1

function woo_archive_custom_cart_button_text() {
return __( 'My Button Text', 'woocommerce' );
}

Any chance you can help me out?
Thanks

Comments

Sign In or Register to comment.