Automattic\WooCommerce\Admin\Features\Fulfillments\Providers

AbstractShippingProvider::can_ship_from_to │ public │ WC 1.0

Check if the shipping provider can ship from a specific country to another.

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

Хуков нет.

Возвращает

bool. True if the provider can ship from the source to the destination, false otherwise.

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

$AbstractShippingProvider = new AbstractShippingProvider();
$AbstractShippingProvider->can_ship_from_to( $shipping_from, $shipping_to ): bool;
$shipping_from(строка) (обязательный)
The country code from which the shipment is sent.
$shipping_to(строка) (обязательный)
The country code to which the shipment is sent.

Код AbstractShippingProvider::can_ship_from_to() WC 11.3.0

public function can_ship_from_to( string $shipping_from, string $shipping_to ): bool {
	return $this->can_ship_from( $shipping_from ) && $this->can_ship_to( $shipping_to );
}