Skip to content

Instantly share code, notes, and snippets.

@lmartins
Created October 17, 2014 13:57
Show Gist options
  • Save lmartins/cd7691e8a131170f3f10 to your computer and use it in GitHub Desktop.
Save lmartins/cd7691e8a131170f3f10 to your computer and use it in GitHub Desktop.
Change Add to Cart to Read More
add_filter( 'woocommerce_loop_add_to_cart_link', 'mw_change_add_to_cart_loop' );
function mw_change_add_to_cart_loop( $product ) {
global $product; // this may not be necessary as it should have pulled the object in already
return '<a class="button" href="' . esc_url( $product->get_permalink( $product->id ) ) . '">DETALHES</a>';
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment