This little snippet will help you automatically close the Quick View modal after adding the product to the cart. It is perfect for webmasters who want to streamline their customers’ shopping experience. It can be easily integrated with any plugin that adds JavaScript onto your website, or by using our Premium Custom Code Snippets extension.
<script>
jQuery(document.body).on('added_to_cart', function() {
let maybeCloseButton = document.querySelector('.ct-toggle-close')
if (! maybeCloseButton) return
maybeCloseButton.click()
})
</script>