Replace add to cart button
-
Hi for my add to cart button i use this code
add_filter( 'woocommerce_loop_add_to_cart_link', 'test_replace_add_to_cart_with_quickview', 10, 2 ); function test_replace_add_to_cart_with_quickview( $html, $product ) { if ( method_exists( $product, 'get_id' ) ) { $product_id = $product->get_id(); } else { $product_id = $product->id; } // Set HERE your button link $link = get_permalink($product_id); $html = '<a rel="nofollow" qv-id = "'.$product_id.'" class="woocommerce-LoopProduct-link quickview-button button">'.esc_html__('Select', 'test-plugin').'</a>'; return $html; }
and works ok.
But i want to replace it with the quick view button. How could i do this?Thanks a lot
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
- The topic ‘Replace add to cart button’ is closed to new replies.