Closed (fixed)
Project:
Commerce Currency Resolver
Version:
8.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
19 Oct 2020 at 19:26 UTC
Updated:
10 Nov 2020 at 18:29 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
ahmed_samir commentedComment #3
ahmed_samir commentedComment #4
valicThere is no need to extend DefaultExchangeCalculator while we override immediately his only function implementation.
We can leave the Abstract class to be extended, and the second line is fine, resolver is not taking into consideration if the exchanger plugin is enabled or not
Comment #6
valicAdded your change that the provider needs to enabled to be taken into account.
About your specific case from an issue on commerce_exchanger, I suggest that you overwrite this module service
commerce_currency_resolver.calculator as described here https://www.drupal.org/docs/drupal-apis/services-and-dependency-injectio...
For the future maybe introduction a proper resolver for exchange price calculator would be better, so anyone could write their own, but on another hand, it still seems like overkill