mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-08-30 05:00:51 +08:00
Replace CurrencySupport class with a service
This commit is contained in:
parent
521cbf4e26
commit
c43a4999aa
3 changed files with 8 additions and 63 deletions
|
@ -14,10 +14,8 @@ use Dhii\Modular\Module\ModuleInterface;
|
|||
use Interop\Container\ServiceProviderInterface;
|
||||
use Psr\Container\ContainerInterface;
|
||||
use WooCommerce\PayPalCommerce\ApiClient\Authentication\Bearer;
|
||||
use WooCommerce\PayPalCommerce\ApiClient\Authentication\PayPalBearer;
|
||||
use WooCommerce\PayPalCommerce\ApiClient\Endpoint\BillingAgreementsEndpoint;
|
||||
use WooCommerce\PayPalCommerce\ApiClient\Exception\RuntimeException;
|
||||
use WooCommerce\PayPalCommerce\ApiClient\Helper\CurrencySupport;
|
||||
use WooCommerce\PayPalCommerce\ApiClient\Helper\DccApplies;
|
||||
use WooCommerce\PayPalCommerce\Button\Helper\MessagesApply;
|
||||
use WooCommerce\PayPalCommerce\Compat\PPEC\PPECHelper;
|
||||
|
@ -57,9 +55,6 @@ class StatusReportModule implements ModuleInterface {
|
|||
/* @var Bearer $bearer The bearer. */
|
||||
$bearer = $c->get( 'api.bearer' );
|
||||
|
||||
$currency_support = $c->get( 'api.helpers.currency-support' );
|
||||
assert( $currency_support instanceof CurrencySupport );
|
||||
|
||||
/* @var DccApplies $dcc_applies The ddc applies. */
|
||||
$dcc_applies = $c->get( 'api.helpers.dccapplies' );
|
||||
|
||||
|
@ -97,7 +92,7 @@ class StatusReportModule implements ModuleInterface {
|
|||
'exported_label' => 'WooCommerce currency supported',
|
||||
'description' => esc_html__( 'Whether PayPal supports the default store currency or not.', 'woocommerce-paypal-payments' ),
|
||||
'value' => $this->bool_to_html(
|
||||
$currency_support->supports_currency()
|
||||
$c->get( 'api.shop.is-currency-supported' )
|
||||
),
|
||||
),
|
||||
array(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue