我正在使用插件设置woocommerce中订单交付的最早日期。
以下代码:
$current_time = current_time( \'timestamp\' );
if( $prdd_minimum_delivery_time != \'\' && $prdd_minimum_delivery_time != 0 ) {
$advance_seconds = $prdd_minimum_delivery_time *60 *60;
$cut_off_timestamp = $current_time + $advance_seconds;
$cut_off_date = date( "d-m-Y", $cut_off_timestamp );
$min_date = date( "j-n-Y", strtotime( $cut_off_date ) );
} else {
$min_date = date( "j-n-Y", $current_time );
下面是一段代码:
jQuery(document).ready(function() {
var formats = ["d.m.y", "d-m-yy","MM d, yy"];
var min_date = jQuery( "#prdd_lite_hidden_minimum_delivery_time" ).val();
var split_date = min_date.split( "-" );
var min_date_to_set = new Date ( split_date[1] + "/" + split_date[0] + "/" + split_date[2] );
var fourWorkingDays = new Date();
var adjustments = [2, 1, 1, 1, 1, 3, 3]; // Offsets by day of the week, sunday is first day here
我正在添加1-2天的偏移量,但我的目标是将其设置为规则“订单到下午3点才能到达明天”,我如何修改它?