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
Just tried your plugin and it seems to have an error when going from cart to checkout (address). An exception has been thrown during the rendering of a template ("Warning: assert(): assert($shippingAddress instanceof AddressInterface) failed").
At first time, the shipping and billing address are null.
And I saw in your MangoSyliusResolvePaymentMethodForOrder class than you : $shippingAddress = $order->getShippingAddress(); assert($shippingAddress instanceof AddressInterface);
But you doesn't check if it's null or not.
I would suggest to add this between this two lines : if(is_null($shippingAddress)) return true;
Everything should be eligible until we got an address, am I wrong ?
I would like to have your confirmation. Can submit a PR if you're ok with that.
The text was updated successfully, but these errors were encountered:
It does not follow your suggestion as it would change current behavior, just solve fatal.
To make a payment allowed for order without shipping address (How did you do that? Do you have some "license delivered by email" products ?), simply do not set any restrictive zone to it. In that case this will be triggered
Hi!
Just tried your plugin and it seems to have an error when going from cart to checkout (address).
An exception has been thrown during the rendering of a template ("Warning: assert(): assert($shippingAddress instanceof AddressInterface) failed").
At first time, the shipping and billing address are null.
And I saw in your MangoSyliusResolvePaymentMethodForOrder class than you :
$shippingAddress = $order->getShippingAddress(); assert($shippingAddress instanceof AddressInterface);
But you doesn't check if it's null or not.
I would suggest to add this between this two lines :
if(is_null($shippingAddress)) return true;
Everything should be eligible until we got an address, am I wrong ?
I would like to have your confirmation. Can submit a PR if you're ok with that.
The text was updated successfully, but these errors were encountered: