Automattic\WooCommerce\Internal\Orders
IppFunctions::has_store_specified_country_currency
Checks if the store has specified country location and currency used.
Метод класса: IppFunctions{}
Хуков нет.
Возвращает
true|false. true if specified country and currency match the store's ones. false otherwise
Использование
$result = IppFunctions::has_store_specified_country_currency( $country, $currency ): bool;
- $country(строка) (обязательный)
- country to compare store's country with.
- $currency(строка) (обязательный)
- currency to compare store's currency with.
Код IppFunctions::has_store_specified_country_currency() IppFunctions::has store specified country currency WC 10.7.0
public static function has_store_specified_country_currency( string $country, string $currency ): bool {
return ( WC()->countries->get_base_country() === $country && get_woocommerce_currency() === $currency );
}