Forum Replies Created

Viewing 9 replies - 1 through 9 (of 9 total)
  • the temporary solution here:

    https://github.com/woocommerce/woocommerce-paypal-payments/issues/2140

    1. in checkout page (storefront) go edit page mode
    2. and if you are in block mode you have two choice to switch to classic shortcode mode see this screenshot https://ibb.co/34Kp7xp
    3. and if you select the second options (2.) and update the page see the result this will be cause an error and the paypal button shows up for a quick second and then disappears. Failed to execute ‘querySelector’ on ‘Document’: ‘[“#ppc-button-ppcp-gateway”,”paypal”]’ is not a valid selector.
    4. in right side settings (switch to classic checkout button) (will be good!)
    5. in left side slassic shortcode option form the menu (will be error)

    the solution: use the in right side settings (switch to classic checkout button) (will be good!) Screenshots

    https://ibb.co/34Kp7xp

    Expected Behavior Actual Behavior Environment

    WP Version: 6.4.3
    WC Version: 8.6.1
    storefront ( 4.5.4)
    woocommerce-paypal-payments 2.6.0

    Additional Details

    because in block mode dont show any paypal button (this is a bug too i think) i switch to classic shortcode mode

    • This reply was modified 2 years, 1 month ago by wpmanus4.

    Hi @uriahs-victor,

    I have exactly the same issue, can you describe for me how you solved this problem?

    Thread Starter wpmanus4

    (@wpmanus4)

    Hi @shameemreza,

    I talking about two kind of mode block base mode and non block mode (aka Classic Shortcode). When you are in block mode dont have update button in cart page. Only just in Classic Shortcode.

    here some info how switch within this two mode:

    https://woo.com/document/cart-checkout-blocks-status/#section-6

    in block mode woocommerce use cart-fragments.min.js (in debug mode use cart-fragments.js) script and in Classic Shortcode mode use cart.min.js difference between this script cart-fragments.min.js dont have features to refresh mini-cart when i clicked on input field or +/- button to change product quantity on Cart page so i writing a small test script like this and try adding to cart-fragments.js

    $(document).on("click", '.wc-block-components-quantity-selector__button--plus', function () { // When changing the custom "+" or "-"
    
    		$( document.body ).trigger( 'wc_fragment_refresh' );
    		$( document.body ).trigger( 'wc_fragments_refreshed' );
    	});

    but this script dont refresh mini-cart as expected .I described in the previous comment.

    Thread Starter wpmanus4

    (@wpmanus4)

    Hi @shameemreza,

    the block base cart mode and a cart-fragments.js update problem:
    the second click needed because never will be increase the count in mini-cart.
    I writing down the steps:

    • adding a product to the the cart
    • i go to the cart page (in this stage in cart page the product number is 1 and in mini-cart count is 1 too.)
      -i clicked the plus button on cart page and the product number is 2 but in mini-cart stay 1 forever. Need to second click but in cart page the product count is 3 now and in mini-cart will be 2. So the cart page count is always will be more than in mini-cart value and so on. The setTimeout function will not solving this problem because it just delaying the click event.
      I think in cart-fragments.js lacking the features that in cart.js have
      like:
      preventDefault();
      lock and unblock form until the ajax refreshing the page, send ajax request after changing the input value and click on +/- buttons etc. etc.
    • This reply was modified 2 years, 1 month ago by wpmanus4.
    Thread Starter wpmanus4

    (@wpmanus4)

    Hi @anastas10s and @doublezed2

    Thank you for info. I switch to cart page in edit page mode to Classic shortcode version and add this code snippets to theme function.php from this site:

    https://rudrastyh.com/woocommerce/remove-update-cart-button.html

    it seem solved my problem with auto refresh the mini-cart in storefront theme.

    <?php
    /**
     * Update Cart Automatically on Quantity Change
     *
     * @author Misha Rudrastyh
     * @url https://rudrastyh.com/woocommerce/remove-update-cart-button.html
     */
    add_action( 'wp_head', function() {
    
    	?><style>
    	.woocommerce button[name="update_cart"],
    	.woocommerce input[name="update_cart"] {
    		display: none;
    	}</style><?php
    	
    } );
    
    add_action( 'wp_footer', function() {
    	
    	?><script>
    	jQuery( function( $ ) {
    		let timeout;
    		$('.woocommerce').on('change', 'input.qty', function(){
    			if ( timeout !== undefined ) {
    				clearTimeout( timeout );
    			}
    			timeout = setTimeout(function() {
    				$("[name='update_cart']").trigger("click"); // trigger cart update
    			}, 1000 ); // 1 second delay, half a second (500) seems comfortable too
    		});
    	} );
    	</script><?php
    	
    } );

    further info: in classic shortcode mode only use

    woocommerce/assets/js/frontend/cart.min.js

    and if i use define( ‘SCRIPT_DEBUG’, true );

    woocommerce/assets/js/frontend/cart.js

    and if i transform cart page to to block mode it use:

    /woocommerce/assets/js/frontend/cart-fragments.min.js

    and if i use define( ‘SCRIPT_DEBUG’, true );

    /woocommerce/assets/js/frontend/cart-fragments.js

    the difference between in cart-fragments.min.js and cart.min.js is that fragment version not have update feature in the code if i changing something in cart page. So i try add this js code for testing (only if i pressed the counter plus button) but the problem is that it send ajax request before changing the input value and need to press button two times but mini-cart counter always less than the product counter on cart page. Have you any idea how update mini-cart same time as product count in cart page?

    	$(document).on("click", '.wc-block-components-quantity-selector__button--plus', function () { // When changing the custom "+" or "-"
    
    		$( document.body ).trigger( 'wc_fragment_refresh' );
    		$( document.body ).trigger( 'wc_fragments_refreshed' );
    	});
    • This reply was modified 2 years, 1 month ago by wpmanus4.
    Thread Starter wpmanus4

    (@wpmanus4)

    Hello @anastas10s

    Im using storefront theme and if i go edit page mode in the Cart page and try add mini-cart block will be disappearing when i go to original page view (i think the mini-cart block is disabled only Cart page but other page like main shop page is visible in sotrefront and Twenty Twenty-Four themes too) . I switch back to Classic Shortcode mode but on the Cart page need to manually refreshing with new Update Cart button for change/update mini-cart header menu counter. I would like an other solution for keep this nice feature that automatically update the mini-cart header counter when i remove item or change item count in +/- buttons on cart page. The mini-cart in storefront theme i think belong to sotrefront and find this code in storefront-woocommerce-template-functions.php

    if ( ! function_exists( 'storefront_header_cart' ) ) {
    	/**
    	 * Display Header Cart
    	 *
    	 * @since  1.0.0
    	 * @uses  storefront_is_woocommerce_activated() check if WooCommerce is activated
    	 * @return void
    	 */
    	function storefront_header_cart() {
    		if ( storefront_is_woocommerce_activated() ) {
    			if ( is_cart() ) {
    				$class = 'current-menu-item';
    			} else {
    				$class = '';
    			}
    			?>
    		<ul id="site-header-cart" class="site-header-cart menu">
    			<li class="<?php echo esc_attr( $class ); ?>">
    				<?php storefront_cart_link(); ?>
    			</li>
    			<li>
    				<?php the_widget( 'WC_Widget_Cart', 'title=' ); ?>
    			</li>
    		</ul>
    			<?php
    		}
    	}
    }
    • This reply was modified 2 years, 2 months ago by wpmanus4.
    Thread Starter wpmanus4

    (@wpmanus4)

    i tested wp on my localhost server again

    -i not using any other plugins (in plugin folder only use woocommerce plugin) i have clean fresh default install of WP Version: 6.4.3 and WC Version: 8.6.1 and storefront (Version: 4.5.4)
    -i put this code on storefront function.php make sure this -cart-fragments.js or cart-fragments.min.js is invoked but i think is not working somehow.
    here is some info : https://developer.woo.com/2023/06/16/best-practices-for-the-use-of-the-cart-fragments-api/

    function enqueue_wc_cart_fragments() { wp_enqueue_script( 'wc-cart-fragments' ); }
    add_action( 'wp_enqueue_scripts', 'enqueue_wc_cart_fragments' );    

    -when i press add to cart button on main shop page the mini-cart count is updating.
    -only in Cart page when removing items or use +/- button the mini-cart counter not works (not changing at all)
    -chrome and firefox console no any error (Inspect mode)

    -i turned on wp errors on wp-config.php no any errors
    define( ‘WP_DEBUG’, true );
    define( ‘WP_DEBUG_DISPLAY’, true );
    define( ‘WP_DEBUG_LOG’, true );
    define( ‘SCRIPT_DEBUG’, true );

    -i restarted the server and tested again the error logs no errors generated only this:

    access log output:

            127.0.0.1 - - [15/Mar/2024:10:27:01 +0100] "POST /wp-cron.php?doing_wp_cron=1710494821.3560891151428222656250 HTTP/1.1" 200 259 "-" "WordPress/6.4.3; http://localhost"
        127.0.0.1 - - [15/Mar/2024:10:27:00 +0100] "POST /?wc-ajax=add_to_cart HTTP/1.1" 200 3786 "http://localhost/" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:123.0) Gecko/20100101 Firefox/123.0"
        127.0.0.1 - - [15/Mar/2024:10:27:01 +0100] "POST /?wc-ajax=get_refreshed_fragments HTTP/1.1" 200 3709 "http://localhost/index.php/cart/" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:123.0) Gecko/20100101 Firefox/123.0"
        127.0.0.1 - - [15/Mar/2024:10:27:02 +0100] "POST /?wc-ajax=add_to_cart HTTP/1.1" 200 3785 "http://localhost/" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:123.0) Gecko/20100101 Firefox/123.0"
        127.0.0.1 - - [15/Mar/2024:10:27:02 +0100] "POST /?wc-ajax=get_refreshed_fragments HTTP/1.1" 200 3709 "http://localhost/index.php/cart/" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:123.0) Gecko/20100101 Firefox/123.0"
        127.0.0.1 - - [15/Mar/2024:10:27:04 +0100] "GET /index.php/cart/ HTTP/1.1" 200 63151 "http://localhost/" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:123.0) Gecko/20100101 Firefox/123.0"
        127.0.0.1 - - [15/Mar/2024:10:27:08 +0100] "POST /index.php/wp-json/wc/store/v1/batch?_locale=user HTTP/1.1" 207 4779 "http://localhost/index.php/cart/" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:123.0) Gecko/20100101 Firefox/123.0"
        127.0.0.1 - - [15/Mar/2024:10:27:10 +0100] "POST /index.php/wp-json/wc/store/v1/batch?_locale=user HTTP/1.1" 207 3606 "http://localhost/index.php/cart/" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:123.0) Gecko/20100101 Firefox/123.0"
        127.0.0.1 - - [15/Mar/2024:10:27:20 +0100] "POST /wp-cron.php?doing_wp_cron=1710494840.9453849792480468750000 HTTP/1.1" 200 259 "-" "WordPress/6.4.3; http://localhost"
        ::1 - - [15/Mar/2024:10:27:20 +0100] "POST /?wc-ajax=add_to_cart HTTP/1.1" 200 3767 "http://localhost/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36"
        ::1 - - [15/Mar/2024:10:27:24 +0100] "POST /?wc-ajax=add_to_cart HTTP/1.1" 200 3768 "http://localhost/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36"
        ::1 - - [15/Mar/2024:10:27:26 +0100] "GET /index.php/cart/ HTTP/1.1" 200 61656 "http://localhost/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36"
        ::1 - - [15/Mar/2024:10:27:27 +0100] "GET /index.php/checkout/ HTTP/1.1" 200 60620 "http://localhost/index.php/cart/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36"
        ::1 - - [15/Mar/2024:10:27:30 +0100] "POST /index.php/wp-json/wc/store/v1/batch?_locale=user HTTP/1.1" 207 4695 "http://localhost/index.php/cart/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36"
        ::1 - - [15/Mar/2024:10:27:32 +0100] "POST /index.php/wp-json/wc/store/v1/batch?_locale=user HTTP/1.1" 207 4695 "http://localhost/index.php/cart/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36"
        ::1 - - [15/Mar/2024:10:27:33 +0100] "POST /index.php/wp-json/wc/store/v1/batch?_locale=user HTTP/1.1" 207 3523 "http://localhost/index.php/cart/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36"
        127.0.0.1 - - [15/Mar/2024:10:27:51 +0100] "POST /wp-cron.php?doing_wp_cron=1710494871.0212891101837158203125 HTTP/1.1" 200 259 "-" "WordPress/6.4.3; http://localhost"
        ::1 - - [15/Mar/2024:10:27:50 +0100] "POST /index.php/wp-json/wc/store/v1/batch?_locale=user HTTP/1.1" 207 3524 "http://localhost/index.php/cart/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36"
        127.0.0.1 - - [15/Mar/2024:10:28:04 +0100] "GET /index.php/cart/ HTTP/1.1" 200 63037 "http://localhost/" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:123.0) Gecko/20100101 Firefox/123.0"
        127.0.0.1 - - [15/Mar/2024:10:28:05 +0100] "POST /?wc-ajax=get_refreshed_fragments HTTP/1.1" 200 2718 "http://localhost/index.php/cart/" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:123.0) Gecko/20100101 Firefox/123.0"
        127.0.0.1 - - [15/Mar/2024:10:28:06 +0100] "POST /?wc-ajax=get_refreshed_fragments HTTP/1.1" 200 2718 "http://localhost/index.php/cart/" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:123.0) Gecko/20100101 Firefox/123.0"
        127.0.0.1 - - [15/Mar/2024:10:28:24 +0100] "POST /wp-admin/admin-ajax.php HTTP/1.1" 200 592 "http://localhost/wp-admin/" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:123.0) Gecko/20100101 Firefox/123.0"
        127.0.0.1 - - [15/Mar/2024:10:28:25 +0100] "POST /wp-admin/admin-ajax.php?action=as_async_request_queue_runner&nonce=35ee993cfe HTTP/1.1" 200 413 "-" "WordPress/6.4.3; http://localhost"

    -apache error log:

            [Fri Mar 15 10:26:33.676904 2024] [mpm_prefork:notice] [pid 16707] AH00163: Apache/2.4.52 (Ubuntu) configured -- resuming normal operations
            [Fri Mar 15 10:26:33.676991 2024] [core:notice] [pid 16707] AH00094: Command line: '/usr/sbin/apache2'
    Thread Starter wpmanus4

    (@wpmanus4)

    Hi @afzalpansuvi,

    i tested wp on my localhost server again

    -i not using any other plugins (in plugin folder only use woocommerce plugin) i have clean fresh default install of WP Version: 6.4.3 and WC Version: 8.6.1 and storefront (Version: 4.5.4)
    -i put this code on storefront function.php make sure this -cart-fragments.js or cart-fragments.min.js is invoked but i think is not working somehow.
    here is some info : https://developer.woo.com/2023/06/16/best-practices-for-the-use-of-the-cart-fragments-api/

    function enqueue_wc_cart_fragments() { wp_enqueue_script( 'wc-cart-fragments' ); }
    add_action( 'wp_enqueue_scripts', 'enqueue_wc_cart_fragments' );    

    -when i press add to cart button on main shop page the mini-cart count is updating.
    -only in Cart page when removing items or use +/- button the mini-cart counter not works (not changing at all)
    -chrome and firefox console no any error (Inspect mode)

    -i turned on wp errors on wp-config.php no any errors
    define( ‘WP_DEBUG’, true );
    define( ‘WP_DEBUG_DISPLAY’, true );
    define( ‘WP_DEBUG_LOG’, true );
    define( ‘SCRIPT_DEBUG’, true );

    -i restarted the server and tested again the error logs no errors generated only this:

    access log output:

            127.0.0.1 - - [15/Mar/2024:10:27:01 +0100] "POST /wp-cron.php?doing_wp_cron=1710494821.3560891151428222656250 HTTP/1.1" 200 259 "-" "WordPress/6.4.3; http://localhost"
        127.0.0.1 - - [15/Mar/2024:10:27:00 +0100] "POST /?wc-ajax=add_to_cart HTTP/1.1" 200 3786 "http://localhost/" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:123.0) Gecko/20100101 Firefox/123.0"
        127.0.0.1 - - [15/Mar/2024:10:27:01 +0100] "POST /?wc-ajax=get_refreshed_fragments HTTP/1.1" 200 3709 "http://localhost/index.php/cart/" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:123.0) Gecko/20100101 Firefox/123.0"
        127.0.0.1 - - [15/Mar/2024:10:27:02 +0100] "POST /?wc-ajax=add_to_cart HTTP/1.1" 200 3785 "http://localhost/" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:123.0) Gecko/20100101 Firefox/123.0"
        127.0.0.1 - - [15/Mar/2024:10:27:02 +0100] "POST /?wc-ajax=get_refreshed_fragments HTTP/1.1" 200 3709 "http://localhost/index.php/cart/" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:123.0) Gecko/20100101 Firefox/123.0"
        127.0.0.1 - - [15/Mar/2024:10:27:04 +0100] "GET /index.php/cart/ HTTP/1.1" 200 63151 "http://localhost/" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:123.0) Gecko/20100101 Firefox/123.0"
        127.0.0.1 - - [15/Mar/2024:10:27:08 +0100] "POST /index.php/wp-json/wc/store/v1/batch?_locale=user HTTP/1.1" 207 4779 "http://localhost/index.php/cart/" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:123.0) Gecko/20100101 Firefox/123.0"
        127.0.0.1 - - [15/Mar/2024:10:27:10 +0100] "POST /index.php/wp-json/wc/store/v1/batch?_locale=user HTTP/1.1" 207 3606 "http://localhost/index.php/cart/" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:123.0) Gecko/20100101 Firefox/123.0"
        127.0.0.1 - - [15/Mar/2024:10:27:20 +0100] "POST /wp-cron.php?doing_wp_cron=1710494840.9453849792480468750000 HTTP/1.1" 200 259 "-" "WordPress/6.4.3; http://localhost"
        ::1 - - [15/Mar/2024:10:27:20 +0100] "POST /?wc-ajax=add_to_cart HTTP/1.1" 200 3767 "http://localhost/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36"
        ::1 - - [15/Mar/2024:10:27:24 +0100] "POST /?wc-ajax=add_to_cart HTTP/1.1" 200 3768 "http://localhost/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36"
        ::1 - - [15/Mar/2024:10:27:26 +0100] "GET /index.php/cart/ HTTP/1.1" 200 61656 "http://localhost/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36"
        ::1 - - [15/Mar/2024:10:27:27 +0100] "GET /index.php/checkout/ HTTP/1.1" 200 60620 "http://localhost/index.php/cart/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36"
        ::1 - - [15/Mar/2024:10:27:30 +0100] "POST /index.php/wp-json/wc/store/v1/batch?_locale=user HTTP/1.1" 207 4695 "http://localhost/index.php/cart/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36"
        ::1 - - [15/Mar/2024:10:27:32 +0100] "POST /index.php/wp-json/wc/store/v1/batch?_locale=user HTTP/1.1" 207 4695 "http://localhost/index.php/cart/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36"
        ::1 - - [15/Mar/2024:10:27:33 +0100] "POST /index.php/wp-json/wc/store/v1/batch?_locale=user HTTP/1.1" 207 3523 "http://localhost/index.php/cart/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36"
        127.0.0.1 - - [15/Mar/2024:10:27:51 +0100] "POST /wp-cron.php?doing_wp_cron=1710494871.0212891101837158203125 HTTP/1.1" 200 259 "-" "WordPress/6.4.3; http://localhost"
        ::1 - - [15/Mar/2024:10:27:50 +0100] "POST /index.php/wp-json/wc/store/v1/batch?_locale=user HTTP/1.1" 207 3524 "http://localhost/index.php/cart/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36"
        127.0.0.1 - - [15/Mar/2024:10:28:04 +0100] "GET /index.php/cart/ HTTP/1.1" 200 63037 "http://localhost/" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:123.0) Gecko/20100101 Firefox/123.0"
        127.0.0.1 - - [15/Mar/2024:10:28:05 +0100] "POST /?wc-ajax=get_refreshed_fragments HTTP/1.1" 200 2718 "http://localhost/index.php/cart/" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:123.0) Gecko/20100101 Firefox/123.0"
        127.0.0.1 - - [15/Mar/2024:10:28:06 +0100] "POST /?wc-ajax=get_refreshed_fragments HTTP/1.1" 200 2718 "http://localhost/index.php/cart/" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:123.0) Gecko/20100101 Firefox/123.0"
        127.0.0.1 - - [15/Mar/2024:10:28:24 +0100] "POST /wp-admin/admin-ajax.php HTTP/1.1" 200 592 "http://localhost/wp-admin/" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:123.0) Gecko/20100101 Firefox/123.0"
        127.0.0.1 - - [15/Mar/2024:10:28:25 +0100] "POST /wp-admin/admin-ajax.php?action=as_async_request_queue_runner&nonce=35ee993cfe HTTP/1.1" 200 413 "-" "WordPress/6.4.3; http://localhost"

    -apache error log:

            [Fri Mar 15 10:26:33.676904 2024] [mpm_prefork:notice] [pid 16707] AH00163: Apache/2.4.52 (Ubuntu) configured -- resuming normal operations
            [Fri Mar 15 10:26:33.676991 2024] [core:notice] [pid 16707] AH00094: Command line: '/usr/sbin/apache2'

    Hello!

    Mini Cart count is not updating properly on Cart page for me too. I Installed the fresh WP Version: 6.4.3 and WC Version: 8.6.1 and storefront (Version: 4.5.4) for testing purpose and try add this to the theme function.php this snippets but not working. I have no other plugin installed or theme just this 3 (wp,wc,storefront) fresh install.

    function enqueue_wc_cart_fragments() { wp_enqueue_script( 'wc-cart-fragments' ); } add_action( 'wp_enqueue_scripts', 'enqueue_wc_cart_fragments' );

    I found some post for similar problem where is maybe solved this problem use this code but in my case not working.

    wp_enqueue_script( 'wc-cart-fragments' );

    https://wordpress.org/support/topic/cart-fragments-not-updating/

    https://wordpress.org/support/topic/elementor-mini-cart-widget-not-working-after-update/

    I tried different wc and wp versions but the problem is same.

    The default wp themes like twentytwentyfour dont have mini-cart in header when you are in Cart page so its not possible testing this problem.

    • This reply was modified 2 years, 2 months ago by wpmanus4.
Viewing 9 replies - 1 through 9 (of 9 total)