Skip to content

Instantly share code, notes, and snippets.

@mgibbs189
Last active November 23, 2020 13:46
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 mgibbs189/f68383e2dfb8141cea11aba29750aada to your computer and use it in GitHub Desktop.
Save mgibbs189/f68383e2dfb8141cea11aba29750aada to your computer and use it in GitHub Desktop.
Enfold - fix product quantity buttons on refresh
<?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