Created
June 8, 2014 22:23
-
-
Save claudiosanches/bf3e4a2cc362a8033a7e to your computer and use it in GitHub Desktop.
WooCommerce - Change product loop add to cart button
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 | |
function custom_woocommerce_loop_add_to_cart_link( $html, $product ) { | |
return '<a href="' . get_permalink( $product->id ) . '" class="button">' . __( 'Texto do botão' ) . '</a>'; | |
} | |
add_filter( 'woocommerce_loop_add_to_cart_link', 'custom_woocommerce_loop_add_to_cart_link', 10, 2 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment