Automattic\WooCommerce\Admin\Features\Fulfillments\Providers
AbstractShippingProvider::can_ship_to
Check if the shipping provider can ship to a specific country.
Метод класса: AbstractShippingProvider{}
Хуков нет.
Возвращает
bool. True if the provider can ship to the country, false otherwise.
Использование
$AbstractShippingProvider = new AbstractShippingProvider(); $AbstractShippingProvider->can_ship_to( $country_code ): bool;
- $country_code(строка) (обязательный)
- The country code to check.
Код AbstractShippingProvider::can_ship_to() AbstractShippingProvider::can ship to WC 11.3.0
public function can_ship_to( string $country_code ): bool {
return in_array( $country_code, $this->get_shipping_to_countries(), true );
}