Skip to content

Commit 07afb3d

Browse files
authored
Merge 71d7701 into 3d73e0f
2 parents 3d73e0f + 71d7701 commit 07afb3d

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

inc/managers/class-membership-manager.php

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -219,11 +219,13 @@ public function check_pending_site_created() {
219219
);
220220

221221
/*
222-
* Re-enqueue the async action so Action Scheduler retries
223-
* the site creation without waiting for the next cron tick.
222+
* Return 'stopped' so the frontend retries via its own polling
223+
* loop. The Action Scheduler will also retry on the next cron
224+
* run. We do NOT enqueue an additional async action here because
225+
* that would create two competing retry sources — the frontend
226+
* poll and the AS job — which can race and attempt site creation
227+
* twice simultaneously.
224228
*/
225-
wu_enqueue_async_action('wu_async_publish_pending_site', ['membership_id' => $membership->get_id()], 'membership');
226-
227229
wp_send_json(['publish_status' => 'stopped']);
228230

229231
exit;

0 commit comments

Comments
 (0)