Drawer hide


This event fires after the user dismissed the Drawer via a button, by clicking the Drawer overlay, by pressing the escape key, or when the Drawer closes progammaticaly—for example with a JS method.


drawerobjectHolds the drawer with all options and properties.


window.addEventListener('DOMContentLoaded', (event) => {
    const my_prefix = window.CartPops;

    my_prefix.drawer.on( 'hide', function( drawer ) {
            console.log(`The ${drawer._type} showed up :)!`);
            // Do Analytics or show something
    } );

Keep in mind

Custom development is outside the scope of our support. However, if you’re looking for more advanced support, our team is happy to refer you to a trusted source.

It's time to improve your WooCommerce Cart

CartPops is a WooCommerce Add To Cart Popup, that helps every shop owner improve their user experience, increase conversions & maximize profits.

Was this page helpful?