Skip to content

Commit d8c7d10

Browse files
Add city drop-down to WooCommerce addresses:
#138 Solved: Wrong behavior in sale price dates | #142
1 parent 365ad7b commit d8c7d10

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

includes/plugins/woocommerce.php

+4-6
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,7 @@ public function add_settings( $old_settings ) {
150150
*/
151151
public function wpp_admin_woocommerce_jalali_datepicker_assets() {
152152
global $wpp_months_name;
153+
153154
$screen = get_current_screen();
154155

155156
if ( ! $screen || ! property_exists( $screen, 'post_type' ) ) {
@@ -159,12 +160,9 @@ public function wpp_admin_woocommerce_jalali_datepicker_assets() {
159160
$suffix = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG || wpp_is_active( 'dev_mode' ) ? '' : '.min';
160161
$current_screen = $screen->post_type;
161162

162-
if ( wpp_is_active( 'woo_fix_date' )
163-
&& in_array( $current_screen, array( 'product', 'shop_order', 'shop_coupon', 'wc-reports' ) ) ) {
164-
wp_enqueue_script( 'wpp_jalali_datepicker', WP_PARSI_URL . 'assets/js/jalalidatepicker.min.js', array(
165-
'jquery',
166-
'jquery-ui-datepicker'
167-
), WP_PARSI_VER );
163+
if ( wpp_is_active( 'woo_fix_date' ) && in_array( $current_screen, array( 'product', 'shop_order', 'shop_coupon', 'wc-reports' ) ) ) {
164+
wp_enqueue_script( 'wpp_jalali_datepicker', WP_PARSI_URL . 'assets/js/jalalidatepicker.min.js', array( 'jquery', 'jquery-ui-datepicker' ), WP_PARSI_VER );
165+
168166
wp_enqueue_style( 'wpp_jalali_datepicker', WP_PARSI_URL . "assets/css/jalalidatepicker$suffix.css", null, WP_PARSI_VER );
169167

170168
do_action( 'wpp_jalai_datepicker_enqueued', 'wc' );

0 commit comments

Comments
 (0)