Enqueue fragments only in the cart widget
This commit is contained in:
parent
91da0a15df
commit
35cd4518bb
|
@ -430,7 +430,6 @@ class WC_Frontend_Scripts {
|
|||
|
||||
// Global frontend scripts.
|
||||
self::enqueue_script( 'woocommerce' );
|
||||
self::enqueue_script( 'wc-cart-fragments' );
|
||||
|
||||
// CSS Styles.
|
||||
$enqueue_styles = self::get_styles();
|
||||
|
|
|
@ -56,6 +56,8 @@ class WC_Widget_Cart extends WC_Widget {
|
|||
return;
|
||||
}
|
||||
|
||||
wp_enqueue_script( 'wc-cart-fragments' );
|
||||
|
||||
$hide_if_empty = empty( $instance['hide_if_empty'] ) ? 0 : 1;
|
||||
|
||||
if ( ! isset( $instance['title'] ) ) {
|
||||
|
|
Loading…
Reference in New Issue