Automattic\WooCommerce\Internal\Abilities
AbilitiesTracking::handle_wp_pre_execute_ability
Handle the wp_pre_execute_ability filter (WordPress 7.1+), to record short-circuited calls.
Метод класса: AbilitiesTracking{}
Хуков нет.
Возвращает
mixed. The unchanged value.
Использование
$AbilitiesTracking = new AbilitiesTracking(); $AbilitiesTracking->handle_wp_pre_execute_ability( $pre, $ability_name );
- $pre(разное) (обязательный)
- The pre-computed result, or the core sentinel to continue execution.
- $ability_name(строка) (обязательный)
- The ability name.
Код AbilitiesTracking::handle_wp_pre_execute_ability() AbilitiesTracking::handle wp pre execute ability WC 11.3.0
public function handle_wp_pre_execute_ability( $pre, $ability_name ) {
// WP_Filter_Sentinel ships with WordPress 7.1, which the PHPStan WordPress stubs predate (see #69841).
if ( ! $pre instanceof \WP_Filter_Sentinel ) { // @phpstan-ignore class.notFound
$this->close_frame( $ability_name, false, $pre );
}
return $pre;
}