woocommerce_plugins_are_incompatible_with_feature_by_default хук-фильтрWC 9.2.0

Filter to determine if plugins that don't declare compatibility nor incompatibility with a given feature are to be considered incompatible with that feature.

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

add_filter( 'woocommerce_plugins_are_incompatible_with_feature_by_default', 'wp_kama_woocommerce_plugins_are_incompatible_with_feature_by_default_filter', 10, 2 );

/**
 * Function for `woocommerce_plugins_are_incompatible_with_feature_by_default` filter-hook.
 * 
 * @param bool   $incompatible_by_default Default value, true if plugins are to be considered incompatible by default with the feature.
 * @param string $feature_id              The feature to check.
 *
 * @return bool
 */
function wp_kama_woocommerce_plugins_are_incompatible_with_feature_by_default_filter( $incompatible_by_default, $feature_id ){

	// filter...
	return $incompatible_by_default;
}
$incompatible_by_default(true|false)
Default value, true if plugins are to be considered incompatible by default with the feature.
$feature_id(строка)
The feature to check.

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

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

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

FeaturesController::get_plugins_are_incompatible_by_default()
woocommerce_plugins_are_incompatible_with_feature_by_default
woocommerce/src/Internal/Features/FeaturesController.php 607
return (bool) apply_filters( 'woocommerce_plugins_are_incompatible_with_feature_by_default', $incompatible_by_default, $feature_id );

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

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