Observer or plugin for "after order placed" logic?

Use a plugin on Magento\Sales\Api\OrderManagementInterface::place. The historic sales_order_place_after observer still fires, but it runs inside the same DB transaction as the order save, so any exception you throw rolls back the order, rarely what you want. A plugin gives you a clean afterPlace($subject, $result) hook where you can dispatch an async queue message, send an email, or fire a webhook without endangering the order itself. If you need the quote rather than the order, use Magento\Quote\Api\CartManagementInterface::placeOrder instead, it returns the order ID.

Kishan Savaliya
Kishan Savaliya
Adobe Certified Magento Commerce Developer
Ahmedabad [IN]working hours, replies within four hours
When do you need it

Read personally. Never shared. Or email the brief.

More on claude, magento playground

Need it fixed, not just explained?

Send the brief with your store URL; the written quote comes back within 24 hours.