Automattic\WooCommerce\Internal\OrderWithdrawal
OrderWithdrawalFeatureHighlightNotification::store_sells_to_eu_or_all_countries
Whether the store sells to at least one EU country.
Method of the class: OrderWithdrawalFeatureHighlightNotification{}
No Hooks.
Returns
null. Nothing (null).
Usage
// private - for code of main (parent) class only $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 code WC 11.1.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() )
)
);
}