mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-08-30 05:00:51 +08:00
fixed type and changed property name
This commit is contained in:
parent
eb2298fcae
commit
a225043b3d
2 changed files with 7 additions and 7 deletions
|
@ -30,7 +30,7 @@ return array(
|
|||
},
|
||||
'save-payment-methods.supported-countries' => static function ( ContainerInterface $container ) : array {
|
||||
if ( has_filter( 'woocommerce_paypal_payments_save_payment_methods_supported_country_currency_matrix' ) ) {
|
||||
_deprecated_hook( 'woocommerce_paypal_payments_save_payment_methods_supported_country_currency_matrix', '3.0.0', 'woocommerce_paypal_payments_save_payment_methods_supported_countries', esc_attr__( 'Please use the new Hook to filer countries for saved payments in PayPal Payments.', 'woocommerce-paypal-payments' ) );
|
||||
_deprecated_hook( 'woocommerce_paypal_payments_save_payment_methods_supported_country_currency_matrix', '3.0.0', 'woocommerce_paypal_payments_save_payment_methods_supported_countries', esc_attr__( 'Please use the new Hook to filter countries for saved payments in PayPal Payments.', 'woocommerce-paypal-payments' ) );
|
||||
}
|
||||
|
||||
return apply_filters(
|
||||
|
|
|
@ -19,7 +19,7 @@ class SavePaymentMethodsApplies {
|
|||
*
|
||||
* @var array
|
||||
*/
|
||||
private array $allowed_country_currencies;
|
||||
private array $allowed_countries;
|
||||
|
||||
/**
|
||||
* 2-letter country code of the shop.
|
||||
|
@ -31,15 +31,15 @@ class SavePaymentMethodsApplies {
|
|||
/**
|
||||
* SavePaymentMethodsApplies constructor.
|
||||
*
|
||||
* @param array $allowed_country_currencies The matrix which countries and currency combinations can be used for Save Payment Methods.
|
||||
* @param array $allowed_countries The matrix which countries and currency combinations can be used for Save Payment Methods.
|
||||
* @param string $country 2-letter country code of the shop.
|
||||
*/
|
||||
public function __construct(
|
||||
array $allowed_country_currencies,
|
||||
array $allowed_countries,
|
||||
string $country
|
||||
) {
|
||||
$this->allowed_country_currencies = $allowed_country_currencies;
|
||||
$this->country = $country;
|
||||
$this->allowed_countries = $allowed_countries;
|
||||
$this->country = $country;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -49,6 +49,6 @@ class SavePaymentMethodsApplies {
|
|||
*/
|
||||
public function for_country(): bool {
|
||||
|
||||
return in_array( $this->country, $this->allowed_country_currencies, true );
|
||||
return in_array( $this->country, $this->allowed_countries, true );
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue