Created
May 9, 2020 18:52
-
-
Save Oscar-Abad-Folgueira/c955dd3644e500f50d228be509ab941d to your computer and use it in GitHub Desktop.
WooCommerce Snippet: Cambiar el texto de "Añadir al carrito"
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* @snippet WooCommerce Snippet: Cambiar el texto de "Añadir al carrito" | |
* @author Oscar Abad Folgueira | |
* @author_url https://www.oscarabadfolgueira.com | |
* @snippet_url https://www.oscarabadfolgueira.com/woocommerce-snippet-cambiar-el-texto-anadir-al-carrito/ | |
*/ | |
add_filter( 'woocommerce_product_add_to_cart_text', 'oaf_wc_change_add_to_cart_text' ); | |
add_filter( 'woocommerce_product_single_add_to_cart_text', 'oaf_wc_change_add_to_cart_text' ); | |
function oaf_wc_change_add_to_cart_text() { | |
return __('¡Comprar Ya!', 'woocommerce'); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment