Automattic\WooCommerce\Internal\Abilities
AbilitiesTracking::handle_wp_ability_normalize_input
Handle the wp_ability_normalize_input filter (WordPress 7.1+), to record a rejected normalization.
A missing input schema never reaches this filter. That failure stays unclosed and is recorded as unknown.
Method of the class: AbilitiesTracking{}
No Hooks.
Returns
mixed. The unchanged value.
Usage
$AbilitiesTracking = new AbilitiesTracking(); $AbilitiesTracking->handle_wp_ability_normalize_input( $input, $ability_name );
- $input(mixed) (required)
- The normalized input, or a WP_Error when a filter rejected it. Not recorded.
- $ability_name(string) (required)
- The ability name.
AbilitiesTracking::handle_wp_ability_normalize_input() AbilitiesTracking::handle wp ability normalize input code WC 11.3.0
public function handle_wp_ability_normalize_input( $input, $ability_name ) {
if ( is_wp_error( $input ) ) {
$this->close_frame( $ability_name, false, $input );
}
return $input;
}