• I’m using a Custom product Addon so my product is based on the user , he sets his product weight and goes to checkout to calculate his shipping cost based on wegith , problem is the WooCommerce tends to override over this weight and sets the default weight of product which changes the shipping I’d like to ask how I could disable AJAX at the checkout page (where you enter shipping and billing information) and that instead of using AJAX to update the cart summary based on your location, it would update by doing a natural refresh. Currently the cart summary would update itself without reloading the page whenever the user switches their location via shipping location. I’d like to remove that AJAX and just have the page reload with the updated information.

    i tried to disable AJAX usign this code but didn’t work add_filter( ‘woocommerce_checkout_update_order_review_expired’, ‘__return_false’ );

    • This topic was modified 1 year, 4 months ago by ahmedsahre53.

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hi,

    for better exposure and more targeted support, I suggest you post this in the Woocommerce support forum.

    You can try the following code in your functions.php file:

    function my_disable_checkout_script () {
    wp_dequeue_script ( 'wc-checkout' );
    }
    add_action ( 'wp_enqueue_scripts', 'my_disable_checkout_script' );


    Thread Starter ahmedsahre53

    (@ahmedsahre53)

    Hello,ronaldvw

    I applied your code to function.php , it works correctly but i’m not sure if this the correct way to handle .
    when user tries to change country/ region , he is redirected to homepage and country is not changing.

    Hi,

    you might want to condition that code to be applied to the specific page. Woocommerce has several tags you can use, see also: https://woocommerce.com/document/conditional-tags/

    For more fine-grained and specialized Woocommerce support, feel free to post in the Woocommerce support forum (and if that is a new topic, make sure that this one is closed to avoid having duplicates). Alternatively, a moderator can move this post to another forum.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Disable AJAX Update on checkout for WooCommerce’ is closed to new replies.