Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Change the add to cart button INTO View Product button
- // =================================================================================================================
- add_filter( 'woocommerce_loop_add_to_cart_link', 'add_product_link' );
- function add_product_link( $link ) {
- global $product;
- echo '<a href="'.$product->get_permalink( $product->id ).'" class="button">' . __('View Product', 'woocommerce') . '</a>';
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement