Automattic\WooCommerce\Utilities

FeaturesUtil::get_compatible_features_for_plugin()public staticWC 1.0

Get the ids of the features that a certain plugin has declared compatibility for.

This method can't be called before the woocommerce_init is fired.

Метод класса: FeaturesUtil{}

Хуков нет.

Возвращает

Массив. An array having a 'compatible' and an 'incompatible' key, each holding an array of plugin ids.

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

$result = FeaturesUtil::get_compatible_features_for_plugin( $plugin_name ): array;
$plugin_name(строка) (обязательный)
Plugin name, in the form 'directory/file.php'.

Код FeaturesUtil::get_compatible_features_for_plugin() WC 7.1.0

public static function get_compatible_features_for_plugin( string $plugin_name ): array {
	return wc_get_container()->get( FeaturesController::class )->get_compatible_features_for_plugin( $plugin_name );
}