WC_Background_Emailer
extends WC_Background_Process
in package
WC_Background_Emailer Class.
Table of Contents
- __construct() : mixed
- Initiate new background process.
- delete_all_batches() : WC_Background_Process
- Delete all batches.
- dispatch_queue() : mixed
- Save and run queue.
- kill_process() : mixed
- Kill process.
- schedule_cron_healthcheck() : array<string|int, mixed>
- Schedule cron healthcheck.
- batch_limit_exceeded() : bool
- See if the batch limit has been exceeded.
- close_http_connection() : mixed
- Finishes replying to the client, but keeps the process running for further (async) code execution.
- get_batch() : stdClass
- Get batch.
- get_memory_limit() : int
- Get memory limit.
- get_post_args() : array<string|int, mixed>
- Get post args
- handle() : mixed
- Handle
- is_queue_empty() : bool
- Is queue empty.
- schedule_event() : mixed
- Schedule fallback event.
- task() : mixed
- Task
Methods
__construct()
Initiate new background process.
public
__construct() : mixed
Return values
mixed —delete_all_batches()
Delete all batches.
public
delete_all_batches() : WC_Background_Process
Return values
WC_Background_Process —dispatch_queue()
Save and run queue.
public
dispatch_queue() : mixed
Return values
mixed —kill_process()
Kill process.
public
kill_process() : mixed
Stop processing queue items, clear cronjob and delete all batches.
Return values
mixed —schedule_cron_healthcheck()
Schedule cron healthcheck.
public
schedule_cron_healthcheck(array<string|int, mixed> $schedules) : array<string|int, mixed>
Parameters
- $schedules : array<string|int, mixed>
-
Schedules.
Return values
array<string|int, mixed> —batch_limit_exceeded()
See if the batch limit has been exceeded.
protected
batch_limit_exceeded() : bool
Return values
bool —close_http_connection()
Finishes replying to the client, but keeps the process running for further (async) code execution.
protected
close_http_connection() : mixed
Tags
Return values
mixed —get_batch()
Get batch.
protected
get_batch() : stdClass
Return values
stdClass — Return the first batch from the queue.get_memory_limit()
Get memory limit.
protected
get_memory_limit() : int
Return values
int —get_post_args()
Get post args
protected
get_post_args() : array<string|int, mixed>
Return values
array<string|int, mixed> —handle()
Handle
protected
handle() : mixed
Pass each queue item to the task handler, while remaining within server memory and time limit constraints.
Return values
mixed —is_queue_empty()
Is queue empty.
protected
is_queue_empty() : bool
Return values
bool —schedule_event()
Schedule fallback event.
protected
schedule_event() : mixed
Return values
mixed —task()
Task
protected
task(array<string|int, mixed> $callback) : mixed
Override this method to perform any actions required on each queue item. Return the modified item for further processing in the next pass through. Or, return false to remove the item from the queue.
Parameters
- $callback : array<string|int, mixed>
-
Update callback function.