Last active
November 23, 2020 13:46
-
-
Save mgibbs189/f68383e2dfb8141cea11aba29750aada to your computer and use it in GitHub Desktop.
Enfold - fix product quantity buttons on refresh
This file contains 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 | |
// Add to your (child) theme's functions.php | |
add_action( 'wp_head', function() { | |
?> | |
<script> | |
(function($) { | |
$(document).on('facetwp-loaded', function() { | |
$(document).trigger('updated_cart_totals'); // fix the "+/-" quantity buttons | |
}); | |
})(jQuery); | |
</script> | |
<?php | |
}, 100 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment