Automattic\WooCommerce\Internal\Admin

ShippingLabelBannerDisplayRules::store_in_us_and_usd()privateWC 1.0

Checks if the store is in the US and has its default currency set to USD.

Method of the class: ShippingLabelBannerDisplayRules{}

No Hooks.

Return

true|false.

Usage

// private - for code of main (parent) class only
$result = $this->store_in_us_and_usd();

ShippingLabelBannerDisplayRules::store_in_us_and_usd() code WC 9.3.3

private function store_in_us_and_usd() {
	$base_currency = get_woocommerce_currency();
	$base_location = wc_get_base_location();

	return in_array( $base_currency, $this->supported_currencies, true ) && in_array( $base_location['country'], $this->supported_countries, true );
}