Magento 2 - How to stop order success email programatically
Clash Royale CLAN TAG#URR8PPP
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty margin-bottom:0;
up vote
1
down vote
favorite
I am creating a order programatically in magento 2. What property I need to set on $order object so order success email will not trigger. I have tried below methods with (bool) false, parameter but no succes.
$order->setCanSendNewEmailFlag(false);
$order->setEmailSent(false);
$order->setSendEmail(false);
magento2 order-email
add a comment |Â
up vote
1
down vote
favorite
I am creating a order programatically in magento 2. What property I need to set on $order object so order success email will not trigger. I have tried below methods with (bool) false, parameter but no succes.
$order->setCanSendNewEmailFlag(false);
$order->setEmailSent(false);
$order->setSendEmail(false);
magento2 order-email
1
See here magento.stackexchange.com/questions/102992/â¦
â Mohamed El Mrabet
Sep 8 at 10:35
add a comment |Â
up vote
1
down vote
favorite
up vote
1
down vote
favorite
I am creating a order programatically in magento 2. What property I need to set on $order object so order success email will not trigger. I have tried below methods with (bool) false, parameter but no succes.
$order->setCanSendNewEmailFlag(false);
$order->setEmailSent(false);
$order->setSendEmail(false);
magento2 order-email
I am creating a order programatically in magento 2. What property I need to set on $order object so order success email will not trigger. I have tried below methods with (bool) false, parameter but no succes.
$order->setCanSendNewEmailFlag(false);
$order->setEmailSent(false);
$order->setSendEmail(false);
magento2 order-email
magento2 order-email
edited Sep 8 at 9:31
Teja Bhagavan Kollepara
1
1
asked Sep 8 at 9:29
kapil yadav
10414
10414
1
See here magento.stackexchange.com/questions/102992/â¦
â Mohamed El Mrabet
Sep 8 at 10:35
add a comment |Â
1
See here magento.stackexchange.com/questions/102992/â¦
â Mohamed El Mrabet
Sep 8 at 10:35
1
1
See here magento.stackexchange.com/questions/102992/â¦
â Mohamed El Mrabet
Sep 8 at 10:35
See here magento.stackexchange.com/questions/102992/â¦
â Mohamed El Mrabet
Sep 8 at 10:35
add a comment |Â
2 Answers
2
active
oldest
votes
up vote
2
down vote
You can do that by overiding the
send(Order $order, $forceSyncMode = false)
In
vendor/magento/module-sales/Model/Order/Email/Sender/OrderSender.php
add a comment |Â
up vote
1
down vote
You can see here at below path :
vendor/magento/module-sales/Model/Order/Email/Sender/OrderSender.php
You can override this public function send(Order $order, $forceSyncMode = false) function
Or
You can set from admin (It's better) to disable it instead of programmatically :
Admin -> Stores -> Configuration -> Sales -> Sales Email -> Order -> Enabled
Hope, It will helpful for you.
I need to do that for a specific order that I am creating programatically. It will disable for all orders, that's something not required here.
â kapil yadav
Sep 8 at 11:25
add a comment |Â
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
2
down vote
You can do that by overiding the
send(Order $order, $forceSyncMode = false)
In
vendor/magento/module-sales/Model/Order/Email/Sender/OrderSender.php
add a comment |Â
up vote
2
down vote
You can do that by overiding the
send(Order $order, $forceSyncMode = false)
In
vendor/magento/module-sales/Model/Order/Email/Sender/OrderSender.php
add a comment |Â
up vote
2
down vote
up vote
2
down vote
You can do that by overiding the
send(Order $order, $forceSyncMode = false)
In
vendor/magento/module-sales/Model/Order/Email/Sender/OrderSender.php
You can do that by overiding the
send(Order $order, $forceSyncMode = false)
In
vendor/magento/module-sales/Model/Order/Email/Sender/OrderSender.php
edited Sep 8 at 11:23
Mohamed El Mrabet
693417
693417
answered Sep 8 at 10:35
Lara Gento
293
293
add a comment |Â
add a comment |Â
up vote
1
down vote
You can see here at below path :
vendor/magento/module-sales/Model/Order/Email/Sender/OrderSender.php
You can override this public function send(Order $order, $forceSyncMode = false) function
Or
You can set from admin (It's better) to disable it instead of programmatically :
Admin -> Stores -> Configuration -> Sales -> Sales Email -> Order -> Enabled
Hope, It will helpful for you.
I need to do that for a specific order that I am creating programatically. It will disable for all orders, that's something not required here.
â kapil yadav
Sep 8 at 11:25
add a comment |Â
up vote
1
down vote
You can see here at below path :
vendor/magento/module-sales/Model/Order/Email/Sender/OrderSender.php
You can override this public function send(Order $order, $forceSyncMode = false) function
Or
You can set from admin (It's better) to disable it instead of programmatically :
Admin -> Stores -> Configuration -> Sales -> Sales Email -> Order -> Enabled
Hope, It will helpful for you.
I need to do that for a specific order that I am creating programatically. It will disable for all orders, that's something not required here.
â kapil yadav
Sep 8 at 11:25
add a comment |Â
up vote
1
down vote
up vote
1
down vote
You can see here at below path :
vendor/magento/module-sales/Model/Order/Email/Sender/OrderSender.php
You can override this public function send(Order $order, $forceSyncMode = false) function
Or
You can set from admin (It's better) to disable it instead of programmatically :
Admin -> Stores -> Configuration -> Sales -> Sales Email -> Order -> Enabled
Hope, It will helpful for you.
You can see here at below path :
vendor/magento/module-sales/Model/Order/Email/Sender/OrderSender.php
You can override this public function send(Order $order, $forceSyncMode = false) function
Or
You can set from admin (It's better) to disable it instead of programmatically :
Admin -> Stores -> Configuration -> Sales -> Sales Email -> Order -> Enabled
Hope, It will helpful for you.
answered Sep 8 at 10:52
Rohan Hapani
3,66821457
3,66821457
I need to do that for a specific order that I am creating programatically. It will disable for all orders, that's something not required here.
â kapil yadav
Sep 8 at 11:25
add a comment |Â
I need to do that for a specific order that I am creating programatically. It will disable for all orders, that's something not required here.
â kapil yadav
Sep 8 at 11:25
I need to do that for a specific order that I am creating programatically. It will disable for all orders, that's something not required here.
â kapil yadav
Sep 8 at 11:25
I need to do that for a specific order that I am creating programatically. It will disable for all orders, that's something not required here.
â kapil yadav
Sep 8 at 11:25
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f241412%2fmagento-2-how-to-stop-order-success-email-programatically%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
1
See here magento.stackexchange.com/questions/102992/â¦
â Mohamed El Mrabet
Sep 8 at 10:35