Last active
May 18, 2020 11:10
-
-
Save rajeshsingh520/6167660c7a03a7f226eb5f0f77a62624 to your computer and use it in GitHub Desktop.
set different date place holder for date and time plugin
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 | |
add_action('wp_enqueue_scripts','pisol_placeholder_replacement'); | |
function pisol_placeholder_replacement(){ | |
$js = 'jQuery(function($){ | |
window.pi_date_options.datePlaceholder = "Date....."; | |
});'; | |
wp_add_inline_script('jquery',$js,'after'); | |
} | |
add_filter( 'woocommerce_form_field_args',10,3 ); | |
function pisol_change_label($args, $key, $value){ | |
if($key == 'pi_delivery_date'){ | |
$args['placeholder'] = 'Date....'; | |
} | |
return $args; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment