Home Forums WoodMart support forum Add to Cart Not Working

Add to Cart Not Working

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #447142

    okankuzey
    Participant

    Hi, when the add to cart is clicked on the product detail, it is not added to the cart. Added to cart after refreshing the page.

    Attachments:
    You must be logged in to view attached files.
    #447160

    Luke Nielsen
    Keymaster

    Hello,

    Thank you for reaching out to us!

    Please deactivate all plugins except these ones:

    WPBakery Page Builder or Elementor
    Woodmart Core
    WooCommerce
    Please switch to the parent theme if you use the child.

    After that, check the issue again, if the issue still persists, please confirm the permission for the plugin’s deactivation, switching to the parent theme. As soon as we complete the testing we will enable all back. Do not forget to provide access to the admin dashboard.

    Kind Regards

    #447175

    okankuzey
    Participant

    Hello, I have done all the steps but the problem persists.

    #447354

    Luke Nielsen
    Keymaster

    Hello,

    Could you please disable these plugins as well?

    https://prnt.sc/Qni5YCz44ZUs

    I await your response.

    Kind Regards

    #447384

    okankuzey
    Participant

    Hi, unfortunately the error persists.

    #447393

    Artem Temos
    Keymaster

    Try to add the following PHP code snippet to the child theme functions.php file to fix 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) {
    		if ( isset( $_REQUEST['wd-add-to-cart'] ) ) {
    			return wc_get_checkout_url();
    		}
    		return '';
    	} 
    	return $url;
     }, PHP_INT_MAX);
Viewing 6 posts - 1 through 6 (of 6 total)