WC_Plugin_Updates::get_plugins_for_woocommerce()

Get plugins which “maybe” are for WooCommerce.


Description Description


Return Return

(array) of plugin info arrays


Top ↑

Source Source

File: includes/admin/plugin-updates/class-wc-plugin-updates.php

	protected function get_plugins_for_woocommerce() {
		$plugins = get_plugins();
		$matches = array();

		foreach ( $plugins as $file => $plugin ) {
			if ( 'WooCommerce' !== $plugin['Name'] && ( stristr( $plugin['Name'], 'woocommerce' ) || stristr( $plugin['Description'], 'woocommerce' ) ) ) {
				$matches[ $file ] = $plugin;
			}
		}

		return apply_filters( 'woocommerce_get_plugins_for_woocommerce', $matches, $plugins );
	}


Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.