Skip to content

Instantly share code, notes, and snippets.

@claudiosanches
Created June 8, 2014 22:23
Show Gist options
  • Save claudiosanches/bf3e4a2cc362a8033a7e to your computer and use it in GitHub Desktop.
Save claudiosanches/bf3e4a2cc362a8033a7e to your computer and use it in GitHub Desktop.
WooCommerce - Change product loop add to cart button
<?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