Closed elrosa closed 1 year ago
I prepared a live example:
This is a product with estimated delivery in 2-3 business days (system default): https://22cd831d.cfolks.pl/produkt/simple-product/
This one has a custom delivery range of 2-10 business days: https://22cd831d.cfolks.pl/produkt/product-made-to-order/
Thanks @elrosa i updated plugin to 1.3.3 with this :)
While using this plugin, I noticed the calculations for delivery date ranges were always using absolute days, and the result wasn't always correct. I would expect delivery dates to be calculated only using working days, and the maximum shipping date to be based on a previously calculated start date.
I believe it was also reported here: https://github.com/DanielRiera/estimated-delivery-woocommerce/issues/41
I made the following changes:
Example: Shipping of my products take 2 to 3 business days. Delivery company doesn't work on Saturdays and Sundays. When users visit my website on Friday, they should see expected delivery on Tuesday-Wednesday next week, but they were shown Monday date only.
This happens because both minimum shipping date and maximum shipping date are calculated independently from each other. Minimum delivery time is 2 days, but Friday + 2 days is Sunday; minimum date is then bumped to Monday. Then, max date is Friday + 3 days: Monday again.