Automattic\WooCommerce\Internal\Abilities
AbilitiesTracking::handle_wp_before_execute_ability
Handle the wp_before_execute_ability action.
Метод класса: AbilitiesTracking{}
Хуков нет.
Возвращает
null. Ничего (null).
Использование
$AbilitiesTracking = new AbilitiesTracking(); $AbilitiesTracking->handle_wp_before_execute_ability( $ability_name ): void;
- $ability_name(строка) (обязательный)
- The ability name.
Код AbilitiesTracking::handle_wp_before_execute_ability() AbilitiesTracking::handle wp before execute ability WC 11.3.0
public function handle_wp_before_execute_ability( $ability_name ): void {
if ( ! self::is_tracked_ability( $ability_name ) ) {
return;
}
$index = $this->find_frame( $ability_name, false );
if ( null !== $index ) {
// Opened by wp_ability_invoked; time only the execution so durations match on WordPress 7.0.
$frame = $this->frames[ $index ];
$frame['executing'] = true;
$frame['start'] = microtime( true );
$this->frames[ $index ] = $frame;
return;
}
$this->open_frame( $ability_name, true );
}