Answer the question
In order to leave comments, you need to log in
How to connect third party lightbox in WooCommerce 3 version?
How to connect third party lightbox in WooCommerce 3 version?
Answer the question
In order to leave comments, you need to log in
Third party lightbox can be connected just like any other script.
1. Place all necessary JS and CSS files of lightbox in your theme folder.
2. Then include CSS in functions.php. The wp_enqueue_style() function is designed for this .
3. After that, you need to register and connect the scripts of your plugin. This is done respectively using the wp_register_script() and wp_enqueue_script() functions .
4. When everything is connected (you can see this by clicking on the links in the source code of the page), you can start implementing the lightbox on the page with product cards. This is where actions and filters come in handy. The full list can be found here:https://docs.woocommerce.com/wc-apidocs/hook-docs.html . You just have to find the hook that is responsible for displaying the images and create the appropriate structure for the images that the lightbox you need requires.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question