Automattic\WooCommerce\Internal\Fulfillments\Providers

DHLShippingProvider::can_ship_from_topublicWC 1.0

Checks if DHL can ship between two countries.

Method of the class: DHLShippingProvider{}

No Hooks.

Returns

true|false. True if shipping route is supported.

Usage

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

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