Insertar en Code Snippets
//Modificar texto del botón Añadir al carrito
function custom_woocommerce_product_add_to_cart_text() {
global $product;
$product_type = $product->product_type;switch ( $product_type ) {
case 'external':
return __( 'Ir', 'woocommerce' );
break;
case 'grouped':
return __( 'Ver detalles', 'woocommerce' );
break;
case 'simple':
return __( 'Comprar', 'woocommerce' );
break;
case 'variable':
return __( 'Ver y comprar', 'woocommerce' );
break;
default:
return __( 'Ver detalles', 'woocommerce' );
}}
add_filter( 'woocommerce_product_add_to_cart_text' , 'custom_woocommerce_product_add_to_cart_text' );