Tag: woocommerce datepicker

WooCommerce checkout的时间循环从日期选择器输入字段中选择选项

输入字段1 – 交货日期附有日期选择器。 这将由客户填写所需的日期。 此字段确定在其旁边的选择字段中填充的交货时间选项。 但是,这些选项基于一些规则 从上午11点到下午4点,时间间隔为30分钟。 如果选择的日期=今天,交货开始时间=当前时间+一小时。 如果日期是未来,交货时间是从上午11点到下午4点。 间隔30分钟 我需要帮助根据所选日期的上述参数为woocommerce选项制作arrays。 谢谢。 示例代码:首先,我在使用日期选择器选择日期时更新选择字段选项。 使用下面的代码。 add_action( ‘wp_footer’, ‘woocommerce_update_on_date_select’, 21 ); function woocommerce_update_on_date_select() { if (is_checkout()) { ?> $(document).ready(function() { function updateCart() { var d = $(“#billing_country”).val(), e = $(“#billing_state”).val(), f = $(“input#billing_postcode”).val(), g = $(“#billing_city”).val(), h = $(“input#billing_address_1”).val(), i = $(“input#billing_address_2”).val(), j = d, k = […]