shvsh > /home/1168859.cloudwaysapps.com/rcyqmhwrmv/public_html/docs/wp-content/plugins/ht-knowledge-base/ht-knowledge-base.php
shvsh > /home/1168859.cloudwaysapps.com/rcyqmhwrmv/public_html/docs/wp-content/plugins/ht-knowledge-base/ht-knowledge-base.php
shvsh > /home/1168859.cloudwaysapps.com/rcyqmhwrmv/public_html/docs/wp-content/plugins/ht-knowledge-base/ht-knowledge-base.php

Close PEP Mini Cart When Clicked Outside of Mini Cart

The PEP mini cart can be closed only by clicking on the button shown in the screenshot below:

You may want that the mini cart should get closed whenever the user clicks outside of the mini cart. Yes, you can do so. You just need to add the following code in your theme or child theme’s functions.php file:

add_action('quoteup_after_enquiry_cart_bubble_displayed', 'quoteup_close_mc_when_clicked_outside_76381');

function quoteup_close_mc_when_clicked_outside_76381() {
    $js = '
        jQuery("body :not(div.pep-mc-wrap, div.pep-mc-footer, div.pep-mc-wrap *, div.pep-mc-footer *)").click(function(){
            jQuery("body .pep-mc-collapse").trigger("click");
        });
    ';
    wp_add_inline_script('wdm-draggable', $js);
}

And, now you are done!

Updated on February 22, 2022
shvsh > /home/1168859.cloudwaysapps.com/rcyqmhwrmv/public_html/docs/wp-content/plugins/ht-knowledge-base/ht-knowledge-base.php
shvsh > /home/1168859.cloudwaysapps.com/rcyqmhwrmv/public_html/docs/wp-content/plugins/ht-knowledge-base/ht-knowledge-base.php
shvsh > /home/1168859.cloudwaysapps.com/rcyqmhwrmv/public_html/docs/wp-content/plugins/ht-knowledge-base/ht-knowledge-base.php

Was this article helpful?

shvsh > /home/1168859.cloudwaysapps.com/rcyqmhwrmv/public_html/docs/wp-content/plugins/ht-knowledge-base/ht-knowledge-base.php
shvsh > /home/1168859.cloudwaysapps.com/rcyqmhwrmv/public_html/docs/wp-content/plugins/ht-knowledge-base/ht-knowledge-base.php

Related Articles