Call add to cart in click handler (https://github.com/woocommerce/woocommerce-blocks/pull/2763)
This commit is contained in:
parent
74b6cc5764
commit
94306573bc
|
@ -101,7 +101,9 @@ const AddToCartButton = ( { product } ) => {
|
|||
buttonProps.href = permalink;
|
||||
buttonProps.rel = 'nofollow';
|
||||
} else {
|
||||
buttonProps.onClick = addToCart;
|
||||
buttonProps.onClick = () => {
|
||||
addToCart();
|
||||
};
|
||||
}
|
||||
|
||||
return (
|
||||
|
|
Loading…
Reference in New Issue