Skip to content

Instantly share code, notes, and snippets.

@WordBits
Created June 24, 2018 05:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save WordBits/099c24fe7b91d418c3cf15b1421c8380 to your computer and use it in GitHub Desktop.
Save WordBits/099c24fe7b91d418c3cf15b1421c8380 to your computer and use it in GitHub Desktop.
Quick snippet that prevents cart fragments from being updated in WooCommerce.
<?php
// Download this snippet as a plugin and more at: https://wordbits.localhost/snippet/stopping-cart-fragments-from-updating-in-woocommerce/
// Created by: jeffmatson
?>
<?php
add_action( 'wp_print_scripts', 'nuke_cart_fragments', 100 );
function nuke_cart_fragments() {
wp_dequeue_script( 'wc-cart-fragments' );
return true;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment