Skip to content

[Issue] Add missing order_data array to EmailSender classes #29604

Closed
@m2-assistant

Description

@m2-assistant

This issue is automatically created based on existing pull request: #27454: Add missing order_data array to EmailSender classes


Summary (*)

Magento 2.4-develop
Magento 2.3.4 now recommends using scalar variables instead of objects within the email templates. Unfortunately, not all classes were migrated. For example, \Magento\Sales\Model\order\Email\Sender\ShipmentSender was given the new array, despite now it being deprecated, but its replacement, \Magento\Sales\Model\Order\Shipment\Sender\EmailSender did not.

This change was introduced in commits like fd721b1#diff-7b993c70d2652919564eeaf30afe7326. Several more do change the email templates to use order_data instead.

Examples (*)

  1. Create a shipment email template using {{order_data.is_not_virtual}} (as opposed to {{order.is_not_virtual}});
  2. Send it programatically using \Magento\Sales\Model\Order\Shipment\Sender\EmailSender;

Proposed solution

Metadata

Metadata

Assignees

Labels

Component: SalesFixed in 2.4.xThe issue has been fixed in 2.4-develop branchIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedIssue: Ready for WorkGate 4. Acknowledged. Issue is added to backlog and ready for developmentPriority: P3May be fixed according to the position in the backlog.Progress: doneReported on 2.3.4Indicates original Magento version for the Issue report.Reproduced on 2.4.xThe issue has been reproduced on latest 2.4-develop branchSeverity: S3Affects non-critical data or functionality and does not force users to employ a workaround.

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions