Skip to content

Allow an implementer-provided callback to be executed after each batch #39

Open
@renatonascalves

Description

@renatonascalves

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).

Metadata

Metadata

Labels

enhancementNew feature or requestgood first issueGood for newcomersphpRequires understanding PHP

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions