Automattic\WooCommerce\Internal\Abilities
AbilitiesTracking::handle_wp_before_execute_ability
Handle the wp_before_execute_ability action.
Method of the class: AbilitiesTracking{}
No Hooks.
Returns
null. Nothing (null).
Usage
$AbilitiesTracking = new AbilitiesTracking(); $AbilitiesTracking->handle_wp_before_execute_ability( $ability_name ): void;
- $ability_name(string) (required)
- The ability name.
AbilitiesTracking::handle_wp_before_execute_ability() AbilitiesTracking::handle wp before execute ability code 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 );
}