Skip to content

Instantly share code, notes, and snippets.

@rajeshsingh520
Last active May 17, 2020 10:23
Show Gist options
  • Select an option

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

Select an option

Save rajeshsingh520/ce1c8a863a09bcf8f3785a87e98e5e0c to your computer and use it in GitHub Desktop.
set different preparation time for delivery and pickup
<?php
add_filter('pisol_dtt_setting_filter_pi_order_preparation_days',function($val){ return 0; });
add_filter('pisol_dtt_setting_filter_pi_order_preparation_hours','pisolDifferentPrep');
function pisolDifferentPrep($value){
$type = pi_dtt_delivery_type::getType();
if($type == "delivery"){
return 180;
}else{
return 60;
}
return $value;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment