Automattic\WooCommerce\Internal\Fulfillments\Providers
AmazonLogisticsShippingProvider::can_ship_from_to
Checks if Amazon Logistics can ship between two countries.
Method of the class: AmazonLogisticsShippingProvider{}
No Hooks.
Returns
true|false. True if shipping route is supported.
Usage
$AmazonLogisticsShippingProvider = new AmazonLogisticsShippingProvider(); $AmazonLogisticsShippingProvider->can_ship_from_to( $shipping_from, $shipping_to ): bool;
- $shipping_from(string) (required)
- Origin country code.
- $shipping_to(string) (required)
- Destination country code.
AmazonLogisticsShippingProvider::can_ship_from_to() AmazonLogisticsShippingProvider::can ship from to code WC 10.3.3
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 );
}