Created
December 21, 2020 13:26
-
-
Save yousufansa/d1b98c6877b6811fc60f3dd6b88d430b to your computer and use it in GitHub Desktop.
Front - Enable WC Catalog Ordering Bootstrap Select Script
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if ( ! function_exists( 'front_child_wp_enqueue_wc_catalog_ordering_select_scripts' ) ) { | |
function front_child_wp_enqueue_wc_catalog_ordering_select_scripts() { | |
if ( function_exists( 'front_is_woocommerce_activated' ) && front_is_woocommerce_activated() && ( is_shop() || is_product_category() || is_tax( 'product_label' ) || is_tax( get_object_taxonomies( 'product' ) ) ) ) { | |
wp_enqueue_script( 'front-hs-selectpicker' ); | |
wp_enqueue_script( 'bootstrap-select' ); | |
wp_enqueue_script( 'front-hidemaxlistitem', get_template_directory_uri() . '/assets/js/hideMaxListItem-min.js', array( 'jquery' ), $front_version, true ); | |
} | |
} | |
} | |
add_action( 'wp_enqueue_scripts', 'front_child_wp_enqueue_wc_catalog_ordering_select_scripts' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment