WC_Product::supports( string $feature )
Check if a product supports a given feature.
Description Description
Product classes should override this to declare support (or lack of support) for a feature.
Parameters Parameters
- $feature
-
(Required) string The name of a feature to test support for.
Return Return
(bool) True if the product supports the feature, false otherwise.
Source Source
File: includes/abstracts/abstract-wc-product.php
public function supports( $feature ) {
return apply_filters( 'woocommerce_product_supports', in_array( $feature, $this->supports, true ), $feature, $this );
}
Changelog Changelog
| Version | Description |
|---|---|
| 2.5.0 | Introduced. |