Automattic\WooCommerce\Internal\Admin
ShippingLabelBannerDisplayRules::store_in_us_and_usd()
Checks if the store is in the US and has its default currency set to USD.
Метод класса: ShippingLabelBannerDisplayRules{}
Хуков нет.
Возвращает
true|false
.
Использование
// private - только в коде основоного (родительского) класса $result = $this->store_in_us_and_usd();
Код ShippingLabelBannerDisplayRules::store_in_us_and_usd() ShippingLabelBannerDisplayRules::store in us and usd WC 8.7.0
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 ); }