- 
                Notifications
    You must be signed in to change notification settings 
- Fork 33
Closed
Copy link
Description
I left a note here about making execute_callback optional when ability_class is passed as one of the properties:
invokeonContent_Rewrite_Toolwould have to be static to fit here becauseexecute_callbackis mandatory at the moment during ability registration (label and description, too). If that is too limiting, we could revisit$propertiesvalidation. I also think that we should make$propertiesmandatory, 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 $propertiesmandatory.
- Make execute_callbackoptional whenability_classgets passed.
- Consider making labelanddescriptionoptional whenability_classgets 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