Skip to content

Commit

Permalink
Release 1.1.24
Browse files Browse the repository at this point in the history
  • Loading branch information
alejandrososa committed Jul 11, 2023
1 parent b4cf46b commit 0fac910
Show file tree
Hide file tree
Showing 6 changed files with 39 additions and 7 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ This repository contains the Shopware 5 plugin that enables to process payments

## Documentation

* [Documentation](https://plugin-documentation.wallee.com/wallee-payment/shopware-5/1.1.23/docs/en/documentation.html)
* [Documentation](https://plugin-documentation.wallee.com/wallee-payment/shopware-5/1.1.24/docs/en/documentation.html)

## Support

Support queries can be issued on the [wallee support site](https://app-wallee.com/space/select?target=/support).

## License

Please see the [license file](https://github.com/wallee-payment/shopware-5/blob/1.1.23/LICENSE) for more information.
Please see the [license file](https://github.com/wallee-payment/shopware-5/blob/1.1.24/LICENSE) for more information.
31 changes: 29 additions & 2 deletions custom/plugins/WalleePayment/Subscriber/Order.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,9 @@ public static function getSubscribedEvents()
'Shopware_Modules_Order_SaveOrder_FilterParams' => 'onFilterParams',
'Shopware_Modules_Order_SaveOrder_ProcessDetails' => 'onSaveOrder',
'Shopware_Modules_Order_SendMail_Create' => 'onOrderCreateMail',
'Shopware_Modules_Order_SendMail_Send' => 'onOrderSendMail'
];
'Shopware_Modules_Order_SendMail_Send' => 'onOrderSendMail',
'Shopware_Modules_Order_SendMail_CreateMail_FilterOverrideConfig' => 'onMailCreateFilterOverrideConfig'
];
}

/**
Expand Down Expand Up @@ -191,6 +192,32 @@ public function onOrderCreateMail(\Enlight_Event_EventArgs $args)
}
}

/**
* This function sets the values for the fromMail and fromName parameters,
* right before sending an email.
*
* We do it like this to avoid default behavoir, which is use the value stored
* in the cache. Because of a problem in shopware5 and the portal, when receiving
* a webhook invocation, shopware5 stores values that belong to one language
* to the cache for the default language. This can provoke further calls to the cache
* to get invalid data, as it belongs to a different language.
*
* In the case of the fromMail and fromName, we ensure these values are the expected ones.
*
* @param \Enlight_Event_EventArgs $args
*
* @see \sOrder::sendMail
*/
public function onMailCreateFilterOverrideConfig(\Enlight_Event_EventArgs $args)
{
$overrideConfig = $args->getReturn();
$overrideConfig["fromMail"] = $this->container->get('config')->get('mail');
$overrideConfig['fromName'] = $this->container->get('config')->get('shopName');
$args->setReturn($overrideConfig);

return $args->getReturn();
}

public function onOrderSendMail(\Enlight_Event_EventArgs $args)
{
$context = $args->getContext();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -325,6 +325,7 @@ private function sendOrderEmail(Order $order)
$orderModule = $this->container->get('modules')->Order();
$sUserDataBackup = $orderModule->sUserData;
$orderModule->sUserData = $orderEmailData[0]['orderEmailVariables']['sUserData'];

try {
$this->registry->set('force_order_email', true);
$orderModule->sendMail($orderEmailData[0]['orderEmailVariables']['variables']);
Expand Down
2 changes: 1 addition & 1 deletion custom/plugins/WalleePayment/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
}
],
"type" : "shopware-plugin",
"version" : "1.1.23",
"version" : "1.1.24",
"require" : {
"wallee/sdk" : "3.2.0",
"shopware/shopware": "~5.7",
Expand Down
6 changes: 5 additions & 1 deletion custom/plugins/WalleePayment/plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<label lang="de">wallee Payment</label>
<label lang="en">wallee Payment</label>

<version>1.1.23</version>
<version>1.1.24</version>
<copyright>(c) by wallee AG</copyright>
<license>Apache-2.0</license>
<link>https://www.wallee.com</link>
Expand All @@ -24,6 +24,10 @@
<description lang="en">wallee Integration for Shopware 5</description>
<description lang="it">wallee Integrazione per shopware 5</description>
<description lang="fr">wallee Intégration pour Shopware 5</description>
<changelog version="1.1.24">
<changes lang="en">Fix the incorrect email sender used when operating sub-shops</changes>
<changes lang="de">Behebung des falschen E-Mail-Absenders beim Betrieb von Sub-Shops</changes>
</changelog>
<changelog version="1.1.23">
<changes lang="en">Support of Shopware 5.7.18</changes>
<changes lang="de">Unterstützung von Shopware 5.7.18</changes>
Expand Down
2 changes: 1 addition & 1 deletion docs/en/documentation.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ <h2>Documentation</h2> </div>
</a>
</li>
<li>
<a href="https://github.com/wallee-payment/shopware-5/releases/tag/1.1.23/">
<a href="https://github.com/wallee-payment/shopware-5/releases/tag/1.1.24/">
Source
</a>
</li>
Expand Down

0 comments on commit 0fac910

Please sign in to comment.