Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- add_filter( 'woocommerce_loop_add_to_cart_link', 'replacing_add_to_cart_button', 10, 3 );
- function replacing_add_to_cart_button( $button, $product, $args = array() ) {
- if(is_shop()){
- $button_text = __("View product", "woocommerce");
- $button = '<a href="' . $product->get_permalink() . '" class="button">' . $button_text . '</a>';
- }
- return $button;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement