Automattic\WooCommerce\Internal\OrderWithdrawal
OrderWithdrawalFeatureHighlightNotification::store_sells_to_eu_or_all_countries
Whether the store sells to at least one EU country.
Метод класса: OrderWithdrawalFeatureHighlightNotification{}
Хуков нет.
Возвращает
null. Ничего (null).
Использование
// private - только в коде основоного (родительского) класса $result = $this->store_sells_to_eu_or_all_countries(): bool;
Код OrderWithdrawalFeatureHighlightNotification::store_sells_to_eu_or_all_countries() OrderWithdrawalFeatureHighlightNotification::store sells to eu or all countries WC 11.2.2
private function store_sells_to_eu_or_all_countries(): bool {
$woocommerce = function_exists( 'WC' ) ? WC() : null;
if ( ! $woocommerce || ! $woocommerce->countries instanceof \WC_Countries ) {
return false;
}
return ! empty(
array_intersect(
$woocommerce->countries->get_european_union_countries(),
array_keys( $woocommerce->countries->get_allowed_countries() )
)
);
}