You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
you use $salesChannelContext->getSalesChannel()->getDomains()->first()->getUrl(), to retrieve a potential URL.
However, the domains might be empty - e.g. headless sales channels do not require those except for rare cases like double opt-in etc. so this might fail. also it ignores langauge etc.
candemiralp
changed the title
AbstractPaymentMethodHandler - Might result in TypeError upon adding the product URL $isOpenInvoice=true
[ECP-8842] AbstractPaymentMethodHandler - Might result in TypeError upon adding the product URL $isOpenInvoice=true
Dec 22, 2023
Describe the bug
In https://github.com/Adyen/adyen-shopware6/blob/develop/src/Handlers/AbstractPaymentMethodHandler.php#L637
you use $salesChannelContext->getSalesChannel()->getDomains()->first()->getUrl(), to retrieve a potential URL.
However, the domains might be empty - e.g. headless sales channels do not require those except for rare cases like double opt-in etc. so this might fail. also it ignores langauge etc.
Change that code to something like:
Versions
Shopware version: 6.5.3.3
Plugin version: 3.12.0
The text was updated successfully, but these errors were encountered: