Skip to content

Commit 7cf954c

Browse files
committed
Fix can't set use WPCLI for immediate queue proc
Fix that the "Process Queue Immediately" option could not have the "Using WordPress CLI" value set. processQueueImmediately is coded so that '0': Disabled '1': Use WP-Cron '2': Use WP-CLI But because it's set as a boolean, it can't actually have the '2' option. Change it to a string value with those allowed_values in order to preserve backwards-compatibility.
1 parent 8a477d0 commit 7cf954c

2 files changed

Lines changed: 6 additions & 2 deletions

File tree

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
the WP CLI. This improves performance when debug logs are
66
disabled by allowing us to skip the debug calls entirely.
77
- Remove unused duration column from jobs table.
8+
- Fix that the "Process Queue Immediately" option could not
9+
have the "Using WordPress CLI" value set.
810

911
## 9.2.1 (2025-07-18)
1012

src/Options.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -149,11 +149,13 @@ public static function optionSpecs(): array {
149149
'Queues a new job every time a Post or Page is deleted.'
150150
),
151151
new OptionSpec(
152-
'boolean',
152+
'string',
153153
'processQueueImmediately',
154154
'0',
155155
'Process Queue Immediately',
156-
'Begin processing the queue as soon as a job is added, without waiting for WP-Cron.'
156+
'Begin processing the queue as soon as a job is added, ' .
157+
'without waiting for WP-Cron.',
158+
allowed_values: [ '0', '1', '2' ],
157159
),
158160
new OptionSpec(
159161
'integer',

0 commit comments

Comments
 (0)