Automattic\WooCommerce\Internal\Fulfillments\Providers
AbstractShippingProvider::can_ship_from_to
Check if the shipping provider can ship from a specific country to another.
Method of the class: AbstractShippingProvider{}
No Hooks.
Returns
true|false. True if the provider can ship from the source to the destination, false otherwise.
Usage
$AbstractShippingProvider = new AbstractShippingProvider(); $AbstractShippingProvider->can_ship_from_to( $shipping_from, $shipping_to ): bool;
- $shipping_from(string) (required)
- The country code from which the shipment is sent.
- $shipping_to(string) (required)
- The country code to which the shipment is sent.
AbstractShippingProvider::can_ship_from_to() AbstractShippingProvider::can ship from to code WC 10.3.3
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 );
}