Last active
May 17, 2020 10:25
-
-
Save rajeshsingh520/8299dcbc50ceeee3dc4a55c3431a18e8 to your computer and use it in GitHub Desktop.
This code cleard the date value when you are using the plugin https://wordpress.org/plugins/woo-save-abandoned-carts/ so retained sate is not maintained for date
This file contains hidden or 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
<?php | |
/* | |
Make sure auto selection of date and time is disabled | |
https://wordpress.org/plugins/woo-save-abandoned-carts/ | |
*/ | |
add_action('wp_enqueue_scripts', 'pisol_clearValue'); | |
function pisol_clearValue(){ | |
if(is_checkout()){ | |
$js = 'jQuery(function ($) { | |
setTimeout(\'jQuery("#pi_delivery_date").val("")\',100); | |
});'; | |
wp_add_inline_script( 'jquery', $js, 'after' ); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment