Skip to content

Instantly share code, notes, and snippets.

@rajeshsingh520
Last active May 18, 2020 11:10
Show Gist options
  • Save rajeshsingh520/6167660c7a03a7f226eb5f0f77a62624 to your computer and use it in GitHub Desktop.
Save rajeshsingh520/6167660c7a03a7f226eb5f0f77a62624 to your computer and use it in GitHub Desktop.
set different date place holder for date and time plugin
<?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