Created
June 24, 2018 05:24
-
-
Save WordBits/099c24fe7b91d418c3cf15b1421c8380 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.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