Adding AJAX classes to add-to-cart buttons.
Need to add in the default woocommerce ajax and add to cart classes for ajax to work.
This commit is contained in:
parent
c0ea2d9f6e
commit
527ff7fc5a
|
@ -23,7 +23,7 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|||
global $product;
|
||||
|
||||
echo apply_filters( 'woocommerce_loop_add_to_cart_link',
|
||||
sprintf( '<a rel="nofollow" href="%s" data-quantity="%s" data-product_id="%s" data-product_sku="%s" class="btn btn-outline-primary btn-block">%s</a>',
|
||||
sprintf( '<a rel="nofollow" href="%s" data-quantity="%s" data-product_id="%s" data-product_sku="%s" class="add_to_cart_button ajax_add_to_cart btn btn-outline-primary btn-block">%s</a>',
|
||||
esc_url( $product->add_to_cart_url() ),
|
||||
esc_attr( isset( $quantity ) ? $quantity : 1 ),
|
||||
esc_attr( $product->id ),
|
||||
|
|
Reference in New Issue