-
-
Notifications
You must be signed in to change notification settings - Fork 103
[BUG] Duplicate wc-ajax=add_to_cart #532
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Thank you for reporting. Checked last 3 releases and AJAX request gets twice on WooCommerce 7.8 and bootScore 5.3.0. As described in https://developer.woocommerce.com/2023/05/24/woocommerce-7-8-beta-1-released/, WooCommerce removed the global wp_enqueue_script('wc-cart-fragments'); for performance reason. Because our mini-cart is hard-coded in the bootscore/woocommerce/wc-functions.php Lines 43 to 59 in bfd2ab9
So, v5.3.0 ships the updates for WooCommerce 7.8 and for now, I have no idea why this is happen and how to solve that. But I think this is a minor issue and we can skip that for now. WooCommerce will for sure do improvements there.
Edit:
Edit: It's something here: bootscore/woocommerce/ajax-cart/ajax-add-to-cart.php Lines 76 to 156 in 3351cbe
|
Yes, this click event causes wc-ajax to be called twice. I modified/removed the a.ajax_add_to_cart event. Works normaly |
Do you have removed the entire click event? |
Yes, I'm missing the notification in the mini cart, but I don't have any duplicate quantity and call add_to_cart. I keept only triggers offCanvasCart.addClass('loading').offcanvas('show');
})
$(document.body).on('added_to_cart', function(){
offCanvasCart.removeClass('loading');
});
``` |
Ok, got it. Of course, the alerts have an AJAX request as well. Why this is now twice since WooCommerce dropped the Again, thanks for reporting |
Describe the bug
bootscore to v5.3.1. After update i have duplicate request wc-ajax=add_to_cart. I see this same problem in offical site and dev.
Steps to reproduce
Screenshots and Additional Info
rec-screen.8.webm
Website link
https://bootscore.me/shop/
The text was updated successfully, but these errors were encountered: