Learndash_WooCommerce::is_running_in_background_batch()
Checks whether course enrollment is already running inside a background batch.
Description #
Enrollment for a product carrying many courses is handed to the queue, so that one request does not enroll a customer in dozens of courses at once. The processes that drain that queue are batched already, and queueing from inside one of them would mean the work is never carried out, only handed back to the queue it came from.
Return #
(bool) True when a background batch is running, false otherwise.
Source #
File: includes/woocommerce/includes/class-learndash-woocommerce.php
Changelog #
| Version | Description |
|---|---|
| 5.2.0 | Introduced. |