Description
Let's say a customer saves a collection time for 7am UTC in 10 days.
Then later today the merchant changes the location hours and excludes the 7am UTC.
Then in admin you'll get an exception when you try to get all the collection times.
RuntimeException:
This collection time isn't part of the recurrence.
at vendor/tilleuls/sylius-click-n-collect-plugin/src/CollectionTime/RecurrenceInstanceFinder.php:51
at CoopTilleuls\SyliusClickNCollectPlugin\CollectionTime\RecurrenceInstanceFinder->__invoke(object(Shipment))
(vendor/tilleuls/sylius-click-n-collect-plugin/src/Controller/Admin/CollectionsApiController.php:63)
at CoopTilleuls\SyliusClickNCollectPlugin\Controller\Admin\CollectionsApiController->__invoke(object(Request), 'cancale')
(vendor/symfony/http-kernel/HttpKernel.php:158)
at Symfony\Component\HttpKernel\HttpKernel->handleRaw(object(Request), 1)
(vendor/symfony/http-kernel/HttpKernel.php:80)
at Symfony\Component\HttpKernel\HttpKernel->handle(object(Request), 1, true)
(vendor/symfony/http-kernel/Kernel.php:201)
at Symfony\Component\HttpKernel\Kernel->handle(object(Request))
(public/index.php:33)
How to reproduce
Follow steps listed above.
Possible Solution
Solution is just not to validate the collection time in admin: if you have a collection time then the merchant MUST know.
→ quick fix here: 1e32bf2
Description
Let's say a customer saves a collection time for 7am UTC in 10 days.
Then later today the merchant changes the location hours and excludes the 7am UTC.
Then in admin you'll get an exception when you try to get all the collection times.
How to reproduce
Follow steps listed above.
Possible Solution
Solution is just not to validate the collection time in admin: if you have a collection time then the merchant MUST know.
→ quick fix here: 1e32bf2