Site logo

Archived topic

Display Mini Cart contents automatically without hovering.

3 replies · Started by Biju on January 22, 2021

Viewing posts 1–4 of 4

Hi,

Is there a way to display the mini cart to open and display its contents and close after 2 seconds, every time a product is added to cart? Now, the default behavior of the cart icon is to display the contents when i hover on the icon. I just want it to happen automatically at the Add To Cart event. Something like below...

add_action('woocommerce_after_add_to_cart', 'Show_Mini_Cart');
function Show_Mini_Cart() {
//Open Mini Cart and show contents for a few seconds.
// Close Mini Cart.
// Don't know what to call here.
// Please.
}

Thanks in advance.

Hi there,

That would require a custom javascript solution which is out of the scope of this support forum unfortunately.

Thanks for your understanding :)

Oh.. ok. I thought it might be just an action hook thing. No problem.
Thanks for responding.

No problem :)

This archived topic is closed to new replies.