[3.0.0] Use api-utils for currency definitions #5823
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Resolves #5822
Impact: breaking
Type: feature|bugfix
Issue
Earlier in the 3.0.0 release, we stopped setting
shop.currencies
because it was the same for every shop. We also removed most of the exchange rates feature because it was poorly implemented. But there were still some places in the code checkingshop.currencies
.Solution
Remove remaining use of
shop.currencies
.setAccountProfileCurrency
gql mutation to useCurrencyDefinitions
fromapi-utils
package instead ofshop.currencies
placeOrder
. It was only half implemented and never tested, and it relied onshop.currencies
publishProductToCatalog
mutation function to useCurrencyDefinitions
fromapi-utils
package instead ofshop.currencies
simple-pricing
plugin to no longer includecurrencyExchangePricing
object on prices. This was effectively broken by earlier changes removing exchange rate updating and it relied onshop.currencies
Breaking changes
The
currencyExchangePricing
field is no longer available onProductPricingInfo
type in GraphQL (simple-pricing
plugin)Testing
Main areas of testing: