Open
Description
Description
Bulk task already has an after_batch
function but it's not pluggable. The idea here is to allow an implementer to plug its own callback to be executed after each batch.
https://github.com/alleyinteractive/wp-bulk-task/blob/main/src/class-bulk-task.php#L84-L124
Use Case
Alley devs: The need for this feature came from this.
Acceptance Criteria
- Allow a callback to be provided when the bulk task is being set up which will be called during the
after_batch
function. Define what values are available for passing to the callback (e.g., should we pass the current cursor position? the max number of records? etc).