Skip to content

Instantly share code, notes, and snippets.

@rajeshsingh520
Created February 4, 2026 05:30
Show Gist options
  • Select an option

  • Save rajeshsingh520/e54fb2bd3e400263001fb4a882d31ce7 to your computer and use it in GitHub Desktop.

Select an option

Save rajeshsingh520/e54fb2bd3e400263001fb4a882d31ce7 to your computer and use it in GitHub Desktop.
add_filter('pisol_dtt_setting_filter_pi_type', function($type){
$todays_date = current_time('Y/m/d');
$disable_delivery_date = '2026/02/16';
$cutoff_time = '13:00';
$current_time = current_time('H:i');
if($todays_date === $disable_delivery_date && strtotime($current_time) < strtotime($cutoff_time)){
return 'Pickup';
}
return $type;
}, PHP_INT_MAX);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment