-
Notifications
You must be signed in to change notification settings - Fork 26
Closed
Copy link
Description
I left a note here about making execute_callback
optional when ability_class
is passed as one of the properties:
invoke
onContent_Rewrite_Tool
would have to be static to fit here becauseexecute_callback
is mandatory at the moment during ability registration (label and description, too). If that is too limiting, we could revisit$properties
validation. I also think that we should make$properties
mandatory, as you still must provide these 3 properties, so validation passes before the ability instance gets created.
I have an example from @felixarntz of using ability_class
from the AI chatbot demo using the PHP AI Client SDK presented at WC US:

It's where not only the execute_callback
was mocked, but also the description.
Proposal
- Make
$properties
mandatory. - Make
execute_callback
optional whenability_class
gets passed. - Consider making
label
anddescription
optional whenability_class
gets passed, with the assumption that the developer will set it in the custom class extendingWP_Ability
.
Metadata
Metadata
Assignees
Labels
[Status] In ProgressAssigned work scheduledAssigned work scheduled