WordPress at Your Fingertips
function is not described

WC_Shipping_Method::supports() public WC 1.0

Check if a shipping method supports a given feature.

Methods should override this to declare support (or lack of support) for a feature.

{} It's a method of the class: WC_Shipping_Method{}

Hooks from the method


true|false. True if the shipping method supports the feature, false otherwise.


$WC_Shipping_Method = new WC_Shipping_Method();
$WC_Shipping_Method->supports( $feature );
$feature(string) (required)
The name of a feature to test support for.

Code of WC_Shipping_Method::supports() WC 5.8.0

public function supports( $feature ) {
	return apply_filters( 'woocommerce_shipping_method_supports', in_array( $feature, $this->supports ), $feature, $this );