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


(Required) string The name of a feature to test support for.

Top ↑

Return Return

(bool) True if the product supports the feature, false otherwise.

Top ↑

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 );

Top ↑

Changelog Changelog

Version Description
2.5.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.