The Woocommerce template add-to-cart.php contains this code:
echo apply_filters( 'woocommerce_loop_add_to_cart_link', // WPCS: XSS ok.
sprintf( '<a href="%s" data-quantity="%s" class="%s" %s>%s</a>',
esc_url( $product->add_to_cart_url() ),
esc_attr( isset( $args['quantity'] ) ? $args['quantity'] : 1 ),
esc_attr( isset( $args['class'] ) ? $args['class'] : 'button' ),
isset( $args['attributes'] ) ? wc_implode_html_attributes( $args['attributes'] ) : '',
esc_html( $product->add_to_cart_text() )
),
$product, $args );
I need to add this markup to the tag
<div class="icw"><i class="a3"></i></div>
I tried adding it directly but the new element was added after the actual link.
This is what I tried;
sprintf( '<a href="%s" data-quantity="%s" class="%s" %s><div class="icw"><i class="a3"></i></div>%s</a>',
Can anyone explain to me how I go about adding this element?
Many thanks.