WPSlash Licences

Trigger AJAX Popup on the whole product element click

Trigger AJAX Popup on the whole product element click – code snippet guide from WPSlash
Published
Updated
Reading time
1 minutes
Written by
WPSlash team

The following code snippet will make popup opening without having to click on the “Select” button, will actually make the whole product wrapper clickable.

Copy and paste the following code to your functions.php under your child theme

Code
add_action("wp_footer", "wpslash_woofood_hook_trigger_click_wrapper");

function wpslash_woofood_hook_trigger_click_wrapper()
{
    ?>

    <script type="text/javascript">
        

        jQuery(document).ready(function()

        {

                  jQuery(document).on('click', '.woofood-product-loop' , function(e)
                  { 
                    jQuery(this).find('.woofood-quickview-button').trigger('click');


                  });




        });
    </script>
    <?php
}

All guides

FoodMaster (formerly WooFood)12 min read

Best Store Address Setup for Pickup

Compare single-address, multi-location, and directions-first pickup setups to reduce wrong-door visits and simplify checkout.

The plugins these guides are about

FoodMaster for restaurants, courier vouchers for the Greek market, marketplace sync and store tools, all for WooCommerce.

Browse plugins30-day money-back on every plugin