From 667f46cf9e702b6e9f50fadebba2546146b1e25c Mon Sep 17 00:00:00 2001 From: Gerhard Date: Sat, 8 Feb 2014 10:58:50 +0200 Subject: [PATCH] Load Chosen on My Account page for country and state address edits, closes #4674 --- includes/class-wc-frontend-scripts.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/includes/class-wc-frontend-scripts.php b/includes/class-wc-frontend-scripts.php index 3e7213fd332..7b25523c81c 100644 --- a/includes/class-wc-frontend-scripts.php +++ b/includes/class-wc-frontend-scripts.php @@ -84,6 +84,13 @@ class WC_Frontend_Scripts { wp_enqueue_script( 'wc-checkout', $frontend_script_path . 'checkout' . $suffix . '.js', array( 'jquery', 'woocommerce', 'wc-country-select', 'wc-address-i18n' ), WC_VERSION, true ); } + if ( is_page( get_option( 'woocommerce_myaccount_page_id' ) ) ) { + if ( get_option( 'woocommerce_enable_chosen' ) == 'yes' ) { + wp_enqueue_script( 'wc-chosen', $frontend_script_path . 'chosen-frontend' . $suffix . '.js', array( 'chosen' ), WC_VERSION, true ); + wp_enqueue_style( 'woocommerce_chosen_styles', $assets_path . 'css/chosen.css' ); + } + } + if ( is_add_payment_method_page() ) wp_enqueue_script( 'wc-add-payment-method', $frontend_script_path . 'add-payment-method' . $suffix . '.js', array( 'jquery', 'woocommerce' ), WC_VERSION, true );