Automattic\WooCommerce\Internal\Fulfillments\Providers
AmazonLogisticsShippingProvider::can_ship_from_to
Checks if Amazon Logistics can ship between two countries.
Метод класса: AmazonLogisticsShippingProvider{}
Хуков нет.
Возвращает
true|false. True if shipping route is supported.
Использование
$AmazonLogisticsShippingProvider = new AmazonLogisticsShippingProvider(); $AmazonLogisticsShippingProvider->can_ship_from_to( $shipping_from, $shipping_to ): bool;
- $shipping_from(строка) (обязательный)
- Origin country code.
- $shipping_to(строка) (обязательный)
- Destination country code.
Код AmazonLogisticsShippingProvider::can_ship_from_to() AmazonLogisticsShippingProvider::can ship from to WC 10.3.6
public function can_ship_from_to( string $shipping_from, string $shipping_to ): bool {
return in_array( $shipping_from, $this->operating_countries, true ) &&
in_array( $shipping_to, $this->operating_countries, true );
}