Plugin Author
RLDD
(@rermis)
Hi @nostile,
Thank you for this suggestion. I will include a cutoff time that can be adjusted within the interface in the next release.
If this is a critical feature, you can programmatically set a cut off using the following function pasted in your theme’s functions.php file or in the plugin’s functions.php file:
function wse_adjust_days($method,$days,$type) {
$ship_days=0;
$now=strtotime(current_time('mysql'));
if(date('G',$now)>=15 && date('N',$now)<6) $ship_days++; // 10AM cutoff time on weekdays
return $ship_days;
}
Thanks for the code and response but it doesn’t work all too well.
I inserted it into my functions.php and although I have Sundays set as disabled for all shipping methods, Sunday now shows as an estimate delivery date after adding the code.
I also saw in the comments that you put 10AM as the cutoff time but I can seem to understand how 15 and 6 equates to 10AM so that I can adjust it to suit my requirements
Plugin Author
RLDD
(@rermis)
Hi @nostile. Sorry, the 15 in the code will translate to 3pm.
I am far along with the cutoff time feature. It will likely release tomorrow or the weekend!
Plugin Author
RLDD
(@rermis)
Hi @nostile. Version 1.2.2 has been released. Please let me know if you have any issue configuring cutoff time. Thank you!
Hello
Yes, there is an issue – 1 additional day is added.
I set the cutoff time as 3PM. Tomorrow 24/09 is a public holiday in my country and Sunday is set to be excluded. I have a next day delivery option with a max of 1 day. This delivery estimate should show as Monday 26th but instead shows as Tuesday 27th
Plugin Author
RLDD
(@rermis)
Ok, thank you for letting me know. Please make sure that when the new update is installed, to remove the function that was inserted yesterday. All the cutoff logic will now occur within the updated version.
Yes, that seemed to be the problem. Thank you. I had another useful idea for your plugin but forgot. I will create a topic when I remember
Update
Remember I told you tomorrow is a holiday in my country? So I had the date entered in the incorrect order DDMM therefore Saturday was still being considered as a delivery date. When I fixed it, The estimate shows as Tuesday when it should Monday
-
This reply was modified 3 years, 8 months ago by
nostile.