add (extra) a “compare” button
-
Hello,
is it possible to create a code to add a “compare” button in the space next to add to wishlist and quick view
What I mean by that is to add a “compare” button in the red square
I tried to create the code myself, but it does not work
add_action('woocommerce_after_shop_loop_item', 'add_compare_button', 15); function add_compare_button() { global $product; $product_id = $product->get_id(); echo '<div class="single-compare">'; echo '<a href="#" class="compare button" data-product_id="' . esc_attr($product_id) . '">'; echo '<span class="et-icon et-compare"></span>'; echo '</a>'; echo '</div>'; }
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘add (extra) a “compare” button’ is closed to new replies.