How to hide the Drawer after a certain time period

It’s possible to hide the Drawer or Popup after a certain time period by listening to the shown event. In this example below, we’ll automatically close the Drawer after 4 seconds after it has been opened.

	window.CartPops.drawer.on( 'show', function( ev ) {
		setTimeout(() => {
		}, 4000 );
	} );

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?