Automattic\WooCommerce\Abilities
ActionableAbility::prepare_properties
Use the change as the execute callback, and add the extensions input when the feature is on.
Method of the class: ActionableAbility{}
No Hooks.
Returns
array.
Usage
// protected - for code of main (parent) or child class $result = $this->prepare_properties( $args ): array;
- $args(array) (required)
- Ability arguments.
ActionableAbility::prepare_properties() ActionableAbility::prepare properties code WC 11.3.0
protected function prepare_properties( array $args ): array {
$args['execute_callback'] = array( $this, 'execute_change' );
if ( is_array( $args['input_schema'] ?? null ) && ExtensibleAbilities::is_enabled() ) {
$args['input_schema'] = $this->add_extensions_input_schema( $args['input_schema'] );
}
return parent::prepare_properties( $args );
}