wppaste
WordPress

apply_filters( 'validate_plugin_requirements', bool|WP_Error $met_requirements, string $plugin )

Since
6.9.0
Filters the plugin requirement validation response.

Description

If a plugin fails due to a Core-provided validation (incompatible WP, PHP versions), this filter will not fire. A WP_Error response will already be returned.

This filter is intended to add additional validation steps by site administrators.

Compatibility

WordPress
since 6.9.0
  • 6.7.7
  • 6.8.8
  • 6.9.7
  • 7.0.4
  • 7.1.0

Present in 3 of the 5 tracked releases, added in 6.9.0.

Parameters

$met_requirementsbool|WP_Error
True if the plugin meets requirements, WP_Error if not.
$pluginstring
Path to the plugin file relative to the plugins directory.

Where this hook fires · 1

  • wp-admin/includes/plugin.php:1269validate_plugin_requirements()

Source code

	 *	 * @since 6.9.0	 *	 * @param bool|WP_Error $met_requirements True if the plugin meets requirements, WP_Error if not.	 * @param string $plugin Path to the plugin file relative to the plugins directory.	 */	return apply_filters( 'validate_plugin_requirements', true, $plugin );} /** * Determines whether the plugin can be uninstalled. * * @since 2.7.0

Changelog

Introduced in 6.9.0. Unchanged from 6.9.7 through 7.1.0.

  1. 6.9.7
  2. 7.0.4
  3. 7.1.0

Signature, return type and hooks compared across 3 parsed releases.

About this page

Parsed data
Generated from the wordpress-develop 7.1.0 tag, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.
Corrections
Something wrong on this page? Report it and it gets fixed in the next regeneration.