src/Modules/Dashboard_widget.php
public function remove_current_products( $val ) {
		if ( 'theme' === $val['type'] ) {
			$exist = wp_get_theme( $val['slug'] );

			return ! $exist->exists();
		} else {
			$all_plugins = array_keys( get_plugins() );
			foreach ( $all_plugins as $slug ) {
				if ( strpos( $slug, $val['slug'] ) !== false ) {
					return false;
				}
			}

			return true;
		}
	}
public function remove_current_products( $val ) {
		if ( 'theme' === $val['type'] ) {
			$exist = wp_get_theme( $val['slug'] );

			return ! $exist->exists();
		} else {
			$all_plugins = array_keys( get_plugins() );
			foreach ( $all_plugins as $slug ) {
				if ( strpos( $slug, $val['slug'] ) !== false ) {
					return false;
				}
			}

			return true;
		}
	}
public function remove_current_products ( $ val ) { if ( 'theme' === $ val [ 'type' ] ) { $ exist = wp_get_theme ( $ val [ 'slug' ] ) ; return ! $ exist -> exists ( ) ; } else { $ all_plugins = array_keys ( get_plugins ( ) ) ; foreach ( $ all_plugins as $ slug ) { if ( strpos ( $ slug , $ val [ 'slug' ] ) !== false ) { return false ; } } return true ; } }
Either the current product is installed or not.

@param array $val The current recommended product.

@return bool Either we should exclude the plugin or not.
Either the current product is installed or not .