Skip to content

Instantly share code, notes, and snippets.

@WordBits
Created June 24, 2018 05:28
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/9a2563acde9cf7381174af031193f70a to your computer and use it in GitHub Desktop.
Save WordBits/9a2563acde9cf7381174af031193f70a 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.io/snippet/stop-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