WC_Product::supports()publicWC 2.5.0

Check if a product supports a given feature.

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

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

Hooks from the method


true|false. True if the product supports the feature, false otherwise.


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


Since 2.5.0 Introduced.

Code of WC_Product::supports() WC 6.8.2

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