Home Forums WoodMart support forum Variations not adding to cart

Variations not adding to cart

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #470095

    kadoshandy
    Participant

    With all the plugins uninstalled, I can’t add anything to the cart if is a variation product.
    It keeps spinning and I see a Java error when I’m inspecting the issue:
    https://drive.google.com/file/d/15oa8MzL7sktYENofshdAJW4Mj1oGwSLY/view?usp=drivesdk
    Your help is much appreciated!

    #470120

    Artem Temos
    Keymaster

    Hello,

    Thank you so much for purchasing our theme and contacting our support center.

    Hello,

    Sorry for the delay.

    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);

    Kind Regards
    XTemos Studio

    #470244

    kadoshandy
    Participant

    Thank you. It worked!

    #470245

    Artem Temos
    Keymaster

    You are always welcome. Feel free to contact us if you have any further questions.

Viewing 4 posts - 1 through 4 (of 4 total)

The topic ‘Variations not adding to cart’ is closed to new replies.