I'm trying to ship an order automatically everytime an order is placed, just with event sales_order_save_commit_after works, I tried sales_order_place_after and it throws me the error of "No such entity with order ID".

Anyway,I have the event in etc/events.xml , because in frontend it does not run. However, the order is shipped twice, here you can see:

enter image description here

How can I just run once this event, so I can have just one shipment?



My solution was to use the event checkout_submit_all_after instead. It triggers just once after the order is created.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.