wp_plugin_dependencies_slug filter-hookWC 9.0.0

This is a WordPress - wp_plugin_dependencies_slug hook. The plugin just uses it.

Filters a plugin dependency’s slug before matching to the WordPress.org slug format.

Usage

add_filter( 'wp_plugin_dependencies_slug', 'wp_kama_plugin_dependencies_slug_filter' );

/**
 * Function for `wp_plugin_dependencies_slug` filter-hook.
 * 
 * @param string $slug The slug.
 *
 * @return string
 */
function wp_kama_plugin_dependencies_slug_filter( $slug ){

	// filter...
	return $slug;
}
$slug(string)
The slug.

Changelog

Since 9.0.0 Introduced.

Where the hook is called

PluginVersionRuleProcessor::process()
wp_plugin_dependencies_slug
woocommerce/src/Admin/RemoteSpecs/RuleProcessors/PluginVersionRuleProcessor.php 55
$plugin_name = apply_filters( 'wp_plugin_dependencies_slug', $rule->plugin );

Where the hook is used in WooCommerce

woocommerce/includes/class-woocommerce.php 311
add_filter( 'wp_plugin_dependencies_slug', array( $this, 'convert_woocommerce_slug' ) );