Automattic\WooCommerce\Internal\Orders
IppFunctions::has_store_specified_country_currency()
Checks if the store has specified country location and currency used.
Method of the class: IppFunctions{}
No Hooks.
Return
true|false
. true if specified country and currency match the store's ones. false otherwise
Usage
$result = IppFunctions::has_store_specified_country_currency( $country, $currency ): bool;
- $country(string) (required)
- country to compare store's country with.
- $currency(string) (required)
- currency to compare store's currency with.
IppFunctions::has_store_specified_country_currency() IppFunctions::has store specified country currency code WC 9.6.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 ); }