Created
June 24, 2018 05:28
-
-
Save WordBits/9a2563acde9cf7381174af031193f70a to your computer and use it in GitHub Desktop.
Quick snippet that prevents cart fragments from being updated in WooCommerce.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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