Automattic\WooCommerce\Internal\Fulfillments\Providers

FedExShippingProvider::can_ship_from_topublicWC 1.0

Checks if FedEx can ship between two countries.

Method of the class: FedExShippingProvider{}

No Hooks.

Returns

true|false. True if shipping route is supported.

Usage

$FedExShippingProvider = new FedExShippingProvider();
$FedExShippingProvider->can_ship_from_to( $shipping_from, $shipping_to ): bool;
$shipping_from(string) (required)
Origin country code.
$shipping_to(string) (required)
Destination country code.

FedExShippingProvider::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->supported_countries, true ) &&
		in_array( $shipping_to, $this->supported_countries, true );
}