rename
This commit is contained in:
@@ -7,12 +7,12 @@ if ( ! defined( 'ABSPATH' ) ) {
|
||||
<p class="form-field form-field-wide">
|
||||
<label for="estimated-delivery-date">Estimated delivery date:</label>
|
||||
<input id="estimated-delivery-date" name="estimated-delivery-date"
|
||||
type="date" value="<?php echo $global_estimated_delivery_date ? date("Y-m-d", $global_estimated_delivery_date) : ""; ?>"
|
||||
onChange="onGlobalEstimatedDeliveryDateChange(this.value)"/>
|
||||
type="date" value="<?php echo $order_estimated_delivery_date ? date("Y-m-d", $order_estimated_delivery_date) : ""; ?>"
|
||||
onChange="onOrderEstimatedDeliveryDateChange(this.value)"/>
|
||||
</p>
|
||||
|
||||
<script type="text/javascript">
|
||||
function onGlobalEstimatedDeliveryDateChange(date) {
|
||||
function onOrderEstimatedDeliveryDateChange(date) {
|
||||
var timestamp = parseInt((new Date(date).getTime() / 1000).toFixed(0));
|
||||
|
||||
if (isNaN(timestamp)){
|
||||
@@ -20,8 +20,8 @@ function onGlobalEstimatedDeliveryDateChange(date) {
|
||||
}
|
||||
|
||||
var data = {
|
||||
action: 'wiaas_save_global_estimated_date_for_order',
|
||||
_ajax_nonce: '<?php echo wp_create_nonce( "wiaas_save_global_estimated_date_for_order" ) ?>',
|
||||
action: 'wiaas_save_estimated_date_for_order',
|
||||
_ajax_nonce: '<?php echo wp_create_nonce( "wiaas_save_estimated_date_for_order" ) ?>',
|
||||
order: '<?php echo $order_id ?>',
|
||||
date: timestamp
|
||||
};
|
||||
Reference in New Issue
Block a user