Merge pull request #4676 from kloon/master

Load Chosen on My Account page for country and state address edit
This commit is contained in:
Coen Jacobs 2014-02-09 22:34:32 +01:00
commit 6da86e4e57
1 changed files with 7 additions and 0 deletions

View File

@ -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 );