Automattic\WooCommerce\Internal\Fulfillments\Providers

AbstractShippingProvider::can_ship_frompublicWC 1.0

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

Method of the class: AbstractShippingProvider{}

No Hooks.

Returns

true|false. True if the provider can ship from the country, false otherwise.

Usage

$AbstractShippingProvider = new AbstractShippingProvider();
$AbstractShippingProvider->can_ship_from( $country_code ): bool;
$country_code(string) (required)
The country code to check.

AbstractShippingProvider::can_ship_from() code WC 10.3.3

public function can_ship_from( string $country_code ): bool {
	return in_array( $country_code, $this->get_shipping_from_countries(), true );
}