-
Notifications
You must be signed in to change notification settings - Fork 9.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bugfix - Customer emails are not being sent from admin if customer is from store "0" #26293
Bugfix - Customer emails are not being sent from admin if customer is from store "0" #26293
Conversation
… assiged to store "0". "0" should be considered a valid store id
Hi @matheusgontijo. Thank you for your contribution
For more details, please, review the Magento Contributor Guide documentation. |
@magento give me 2.4-develop instance |
Hi @nuzil. Thank you for your request. I'm working on Magento 2.4-develop instance for you |
Hi @nuzil, here is your Magento instance. |
Anyways, let consider we created a customer programmatically through an integration, and the customer was assigned to store id |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, by the core logic it's possible to have such behaviour.
But I will ask you to change this types:
https://github.com/magento/magento2/pull/26293/files#diff-216320d539f904af6160bad485978341L365
Cause your implementation is assume that storeId can be also null.
there we go @nuzil — modification done! Could we merge now? Thank you! |
Hi @matheusgontijo can you please cover with tests your changes? |
I will take care of test coverage. |
… matheusgontijo-2.4-develop
@magento run all tests |
@engcom-Echo can you please merge 2.4 one more time? |
… matheusgontijo-2.4-develop � Conflicts: � app/code/Magento/Customer/Test/Unit/Model/EmailNotificationTest.php
@magento run all tests |
Hi @nuzil, thank you for the review. |
…f customer is from store "0" #26293
Hi @matheusgontijo, thank you for your contribution! |
Description (*)
Emails are not being sent to customers assigned to store id "0". Actually, store id "0", in the following context should be considered as a valid store id, since it's "admin". The
if
conditions should be actually checking if the store id isnull
:if ($storeId === null) {
instead ofif (!$storeId) {
.Manual testing scenarios (*)
In order to reproduce the issue:
store_id = 0
)Reset Password