Automattic\WooCommerce\Admin\Features\MarketingRecommendations

Init::is_marketing_plugin()protected staticWC 1.0

Returns whether a plugin is a marketing extension.

Method of the class: Init{}

No Hooks.

Return

true|false.

Usage

$result = Init::is_marketing_plugin( $plugin_data ): bool;
$plugin_data(array) (required)
The plugin properties returned by the API.

Init::is_marketing_plugin() code 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 );
}