wp_plugin_dependencies_slug
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
wp_plugin_dependencies_slug
wp_plugin_dependencies_slug
woocommerce/src/Admin/RemoteSpecs/RuleProcessors/PluginVersionRuleProcessor.php 55
$plugin_name = apply_filters( 'wp_plugin_dependencies_slug', $rule->plugin );
woocommerce/src/Admin/Features/Blueprint/Init.php 276
$slug = apply_filters( 'wp_plugin_dependencies_slug', $slug ); // phpcs:ignore WooCommerce.Commenting.CommentHooks.MissingSinceComment
Where the hook is used in WooCommerce
woocommerce/includes/class-woocommerce.php 346
add_filter( 'wp_plugin_dependencies_slug', array( $this, 'convert_woocommerce_slug' ) );