Per https://www.drupal.org/project/commerce_currency_resolver/releases/8.x-1.50 the CurrencyHelper static helper is now a service and should be called by
\Drupal::service('commerce_currency_resolver.calculator')->priceConversion($input_price, $target_currency)

PrintfulShipping should remove Drupal\commerce_currency_resolver\Plugin\Commerce\CommerceCurrencyResolverAmountTrait and replace with the injected service.

Also, OrderItemsTrait needs to replace:

$totalPrice = CurrencyHelper::priceConversion($totalPrice, $pf_currency);

With:

$totalPrice = \Drupal::service('commerce_currency_resolver.calculator')->priceConversion($totalPrice, $pf_currency);

(or the injected service)

Comments

scottsawyer created an issue. See original summary.

scottsawyer’s picture

Status: Active » Needs review
StatusFileSize
new3.37 KB

And a patch. Hopefully works with all the other patches.

scottsawyer’s picture

If you have already applied patch from #3118530: Latest version of Commerce Shipping Breaking Changes, then the previous patch will not apply.

scottsawyer’s picture

Sorry for the noise, there was more to do. This patch still depends on the one mentioned in #3

graber’s picture

Status: Needs review » Needs work

Commerce Currency Resolver min version required in the .info.yml file

scottsawyer’s picture

Ok, I suppose we can just use the latest stable. I'll try to get an updated patch this week.

scottsawyer’s picture

Status: Needs work » Needs review
StatusFileSize
new4.21 KB

Added commerce_currency_resolver version requirement in commerce_printful.info.yml. Also needed a reroll per #3118530: Latest version of Commerce Shipping Breaking Changes. This patch also depends on the patch in #8

scottsawyer’s picture

Changes in #9 required changes to this patch.

scottsawyer’s picture

And this patch depends on #10

I also noticed an issue in my previous patches with $priceExchangerCalculator variable miss named. I had an ugly work around which this patch removes, so it's actually a cleaner patch.

cameron prince’s picture

Status: Needs review » Fixed

Confirmed and committed. Thanks!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.