diff --git a/inc/managers/class-membership-manager.php b/inc/managers/class-membership-manager.php index f76aea2a..d5a919d8 100644 --- a/inc/managers/class-membership-manager.php +++ b/inc/managers/class-membership-manager.php @@ -219,11 +219,13 @@ public function check_pending_site_created() { ); /* - * Re-enqueue the async action so Action Scheduler retries - * the site creation without waiting for the next cron tick. + * Return 'stopped' so the frontend polling loop retries. + * Do NOT also enqueue wu_async_publish_pending_site here — + * that would create two competing retry sources (Action + * Scheduler + frontend) and risk double site creation. + * The existing AS scheduled action will pick up the reset + * flag on its next run. */ - wu_enqueue_async_action('wu_async_publish_pending_site', ['membership_id' => $membership->get_id()], 'membership'); - wp_send_json(['publish_status' => 'stopped']); exit;