Advertisement
Guest User

Untitled

a guest
Aug 21st, 2017
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. // Change the add to cart button INTO View Product button
  2. // =================================================================================================================
  3.  
  4. add_filter( 'woocommerce_loop_add_to_cart_link', 'add_product_link' );
  5. function add_product_link( $link ) {
  6. global $product;
  7. echo '<a href="'.$product->get_permalink( $product->id ).'" class="button">' . __('View Product', 'woocommerce') . '</a>';
  8. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement