Open ajax7700sk opened 2 years ago
Hi, Thanks for letting us know. This will work in newer versions of sylius as you can not map interfaces to target entities on older versions (not sure which exactly), sometimes you need an additional mapping to make it work. Which Sylius version are you using? Could you post a pull request so we can see if the tests will proceed successfully? We could make new version of the plugin supporting only new Sylius versions.
@ajax7700sk Hi, fix is on the way https://github.com/3BRS/sylius-payment-restrictions-plugin/pull/4/files#diff-4a8098d07b0c277f5e28eacf0a2df751c1614874bb8fa0b053aeeb04dfa01e87R21
Note that it is part of bigger update and it will require Sylius 1.12
@hornofj FYI
Hello,
can you replace targetEntity="Sylius\Component\Core\Model\ShippingMethod" with targetEntity="Sylius\Component\Core\Model\ShippingMethodInterface" in trait PaymentMethodRestrictionTrait as it is causing type error if you are accessing channel in PaymentMethod's shippingMethods collection?
You should always use/target entity/resource interface instead of particular resource instance.
Thanks