woocommerce_product_supports хук-фильтрWC 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.

Использование

add_filter( 'woocommerce_product_supports', 'wp_kama_woocommerce_product_supports_filter', 10, 2 );

/**
 * Function for `woocommerce_product_supports` filter-hook.
 * 
 * @param  $feature 
 * @param  $that    
 *
 * @return 
 */
function wp_kama_woocommerce_product_supports_filter( $feature, $that ){

	// filter...
	return $feature;
}
$feature
-
$that
-

Список изменений

С версии 2.5.0 Введена.

Где вызывается хук

WC_Product::supports()
woocommerce_product_supports
woocommerce/includes/abstracts/abstract-wc-product.php 1507
return apply_filters( 'woocommerce_product_supports', in_array( $feature, $this->supports, true ), $feature, $this );

Где используется хук в WooCommerce

Использование не найдено.