Automattic\WooCommerce\Admin\Features\MarketingRecommendations

Init::is_marketing_plugin()protected staticWC 1.0

Returns whether a plugin is a marketing extension.

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

Хуков нет.

Возвращает

true|false.

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

$result = Init::is_marketing_plugin( $plugin_data ): bool;
$plugin_data(массив) (обязательный)
The plugin properties returned by the API.

Код Init::is_marketing_plugin() WC 9.7.1

protected static function is_marketing_plugin( array $plugin_data ): bool {
	$categories = $plugin_data['categories'] ?? array();

	return in_array( self::MARKETING_EXTENSION_CATEGORY_SLUG, $categories, true );
}