-
-
Save webdev1001/7e604e485c53fb7cf78e to your computer and use it in GitHub Desktop.
Change Add to Cart to Read More
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
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