Created
July 1, 2022 11:32
-
-
Save mono96/64e145413723057a2b18c3372ffe7cce to your computer and use it in GitHub Desktop.
class-jp4wc-delivery.php 194行目 echo '<option value="'.$value_date[$i].'">'.$display_date[$i].'</option>'; を差し替える
This file contains 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
for($i = 0; $i <= $setting['reception-period']; $i++){ | |
$set_display_date = $delivery_start_day->format('Y-m-d h:i:s'); | |
$value_date[$i] = get_date_from_gmt($set_display_date, 'Y-m-d'); | |
$display_date[$i] = get_date_from_gmt($set_display_date, __('Y/m/d', 'woocommerce-for-japan' )); | |
if($setting['day-of-week']){ | |
$week_name = $week[$delivery_start_day->format("w")]; | |
$display_date[$i] = $display_date[$i].sprintf(__( '(%s)', 'woocommerce-for-japan' ), $week_name); | |
} | |
//Begin 追加コード 194行目 echo '<option value="'.$value_date[$i].'">'.$display_date[$i].'</option>'; を差し替える | |
//水曜日を配達日指定から除外 | |
if(!(3 == (int)$delivery_start_day->format('w'))) { | |
// 長期休み スタート 長期休みを配達指定日から除外 | |
if('2022-07-10' > $delivery_start_day->format('Y-m-d')) { | |
echo '<option value="'.$value_date[$i].'">'.$display_date[$i].'</option>'; | |
} | |
// 長期休み 終了 長期休みを配達指定日から除外 | |
if('2022-07-15' < $delivery_start_day->format('Y-m-d')) { | |
echo '<option value="'.$value_date[$i].'">'.$display_date[$i].'</option>'; | |
} | |
} | |
//end 追加コード | |
$delivery_start_day->modify('+ 1 day'); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment