gatingActive()) { $this->info('Woo Pro gating is disabled or billing is not configured.'); return self::SUCCESS; } $due = ProSubscription::query() ->where('status', ProSubscription::STATUS_ACTIVE) ->where('auto_renew', true) ->whereNotNull('current_period_end') ->where('current_period_end', '<=', now()) ->get(); foreach ($due as $subscription) { $subscriptions->renewIfDue($subscription); } $this->info('Processed '.$due->count().' subscription(s).'); return self::SUCCESS; } }