Magento 2.3.4 How to change the order status from COMPLETE to CLOSED after 5 days with a cronjob?

magento.stackexchange https://magento.stackexchange.com/questions/319503

Вопрос

Since Yotpo plug-in triggers Automatic Review Email upon Magento changing order status to COMPLETE, I need to further change the status from Complete to Closed after 5 days so that the Automatic Review email is made to be sent to customer on closed status. This ensures the order would have by then been delivered. Could any please suggest how could one accomplish this programmatically?

Это было полезно?

Решение

Magento's closed status is for orders which got a refund. So your approach isn't really possible or intended.

If you need to set it to complete to trigger the review e-mail have a look here how to auto create shipment and therefore complete the order: Magento 2 How to Programmatically Ship an Order

Лицензировано под: CC-BY-SA с атрибуция
Не связан с magento.stackexchange
scroll top