This Sylius plugin defers sending the order confirmation email until the order is actually paid, instead of sending it upon checkout completion (sylius.order.post_complete).
- Removes the default Sylius listener (
sylius.listener.order_complete) that sends the email right after completing checkout. - Triggers the order confirmation email on the
to: ["paid"]transition of thesylius_order_paymentstate machine. - Compatible with Sylius 1.12+ (uses the modern
@sylius.mailer.order_email_manager.shopservice).
composer require waaz/sylius-deferred-order-email-pluginEnable the plugin in config/bundles.php if not added automatically:
return [
// ...
Waaz\SyliusDeferredOrderEmailPlugin\WaazSyliusDeferredOrderEmailPlugin::class => ['all' => true],
];MIT