Skip to content

Instantly share code, notes, and snippets.

@monecchi
Forked from claudiosanches/functions.php
Created April 7, 2016 15:30
Show Gist options
  • Save monecchi/1a3620668ad8982f848c760b05d7b2b3 to your computer and use it in GitHub Desktop.
Save monecchi/1a3620668ad8982f848c760b05d7b2b3 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