Automattic\WooCommerce\Admin\Features\Fulfillments\Providers

USPSShippingProvider::can_ship_from_to │ public │ WC 1.0

Checks if USPS can ship from and to the specified countries.

Метод класса: USPSShippingProvider{}

Хуков нет.

Возвращает

bool.

Использование

$USPSShippingProvider = new USPSShippingProvider();
$USPSShippingProvider->can_ship_from_to( $shipping_from, $shipping_to ): bool;
$shipping_from(строка) (обязательный)
Origin country code.
$shipping_to(строка) (обязательный)
Destination country code.

Код USPSShippingProvider::can_ship_from_to() WC 11.2.2

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 );
}