Home › Forums › WoodMart support forum › Ajax add to cart not working › Reply To: Ajax add to cart not working
January 22, 2023 at 12:39 am
#436950
samer zayer
Participant
i saw this user having the same issue and im also having my site hosted in godaddy
https://xtemos.com/forums/topic/product-add-to-cart-button-wont-stop-spinning/
so i added this :
add_filter(‘woocommerce_add_to_cart_redirect’, function( $url ) {
if( strpos( $url, ‘product-added-to-cart’ ) > 0 || strpos( $url, ‘product_added_to_cart’ ) > 0) {
return ”;
}
return $url;
}, PHP_INT_MAX);
it worked fine but i want to make sure if im doing the right thing.. because i disabled all plugins before and it didnt work