Call toMinorUnits deprecated

Created on 21 June 2023, over 1 year ago
Updated 13 February 2024, 9 months ago

modules\commerce_sezzle_pay\Plugin\Commerce\PaymentGateway\SezzlePayCheckout.php

ADD => use Drupal\commerce_price\MinorUnitsConverterInterface;

Change

public function __construct(array $configuration, $plugin_id, $plugin_definition, EntityTypeManagerInterface $entity_type_manager, PaymentTypeManager $payment_type_manager, PaymentMethodTypeManager $payment_method_type_manager, TimeInterface $time, ClientInterface $client, RounderInterface $rounder, MessengerInterface $messenger, MinorUnitsConverterInterface $minor_units_converter)
{
parent::__construct($configuration, $plugin_id, $plugin_definition, $entity_type_manager, $payment_type_manager, $payment_method_type_manager, $time, $minor_units_converter);

$this->httpClient = $client;
$this->rounder = $rounder;
$this->messenger = $messenger;
$this->minor_units_converter = $minor_units_converter;
}

Basically add MinorUnitsConverterInterface $minor_units_converter and $minor_units_converter to the end and ADD $this->minor_units_converter = $minor_units_converter; then change all instances of "toMinorUnits" to "minor_units_converter"

Check to see if I missed something. See also https://www.drupal.org/project/commerce/issues/3150917

🐛 Bug report
Status

Needs review

Version

1.16

Component

Code

Created by

🇺🇸United States bobburns

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024