} public function onFlowSendMailActionEvent(FlowSendMailActionEvent
$event): ?FlowSendMailActionEvent
{ $sequence =
$event->
getStorableFlow()->
getFlowState()->currentSequence;
if ($sequence instanceof ActionSequence &&
$sequence->action !== 'action.grant.download.access'
) { return null;
} $event->
getDataBag()->
add([ 'contentHtml' =>
str_replace('frontend.account.order.single.download', 'store-api.account.order.single.download',
(string) $event->
getDataBag()->
get('contentHtml'
)),
'contentPlain' =>
str_replace('frontend.account.order.single.download', 'store-api.account.order.single.download',
(string) $event->
getDataBag()->
get('contentPlain'
)),
]);
return $event;
} public function onMailBeforeSentEvent(MailBeforeSentEvent
$event): ?MailBeforeSentEvent
{ $data =
$event->
getData();