Automattic\WooCommerce\Utilities
FeaturesUtil::get_compatible_features_for_plugin
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.
Method of the class: FeaturesUtil{}
No Hooks.
Returns
Array. An array having a 'compatible' and an 'incompatible' key, each holding an array of plugin ids.
Usage
$result = FeaturesUtil::get_compatible_features_for_plugin( $plugin_name ): array;
- $plugin_name(string) (required)
- Plugin name, in the form
'directory/file.php'.
FeaturesUtil::get_compatible_features_for_plugin() FeaturesUtil::get compatible features for plugin code WC 10.8.1
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 );
}