Load photoswipe template only when scripts and styles are loaded
This commit is contained in:
parent
20b857bfbf
commit
deda0f21e9
|
@ -393,6 +393,7 @@ class WC_Frontend_Scripts {
|
|||
if ( current_theme_supports( 'wc-product-gallery-lightbox' ) ) {
|
||||
self::enqueue_script( 'photoswipe-ui-default' );
|
||||
self::enqueue_style( 'photoswipe-default-skin' );
|
||||
add_action( 'wp_footer', 'woocommerce_photoswipe' );
|
||||
}
|
||||
self::enqueue_script( 'wc-single-product' );
|
||||
}
|
||||
|
|
|
@ -199,11 +199,6 @@ add_filter( 'woocommerce_product_tabs', 'woocommerce_sort_product_tabs', 99 );
|
|||
*/
|
||||
add_action( 'woocommerce_product_additional_information', 'wc_display_product_attributes', 10 );
|
||||
|
||||
/**
|
||||
* Photoswipe.
|
||||
*/
|
||||
add_action( 'wp_footer', 'woocommerce_photoswipe' );
|
||||
|
||||
/**
|
||||
* Checkout.
|
||||
*
|
||||
|
|
Loading…
Reference in New Issue