add_filter( 'woocommerce_product_add_to_cart_text' , 'custom_woocommerce_product_add_to_cart_text' ); /** * custom_woocommerce_template_loop_add_to_cart */ function custom_woocommerce_product_add_to_cart_text() { global $product; $product_type = $product->product_type; switch ( $product_type ) { case 'external': return __( 'Comprar productos', 'woocommerce' ); break; case 'grouped': return __( 'Ver productos', 'woocommerce' ); break; case 'simple': return __( 'Añadir al carrito', 'woocommerce' ); break; case 'variable': return __( 'Selección de opciones', 'woocommerce' ); break; default: return __( 'Leer más', 'woocommerce' ); } }
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter