Add Woo Manager email notification milestones with shared mail templates.
Deploy Ladill Woo Manager / deploy (push) Successful in 2m11s
Deploy Ladill Woo Manager / deploy (push) Successful in 2m11s
New order, store connected, Pro expiry, and past-due alerts use the Ladill notification layout with woo branding; expiry reminders dedupe per threshold like hosting. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -6,13 +6,17 @@ use App\Http\Controllers\Controller;
|
||||
use App\Jobs\StoreBootstrapSync;
|
||||
use App\Models\WooStore;
|
||||
use App\Services\Woo\InstallTokenService;
|
||||
use App\Services\Woo\WooNotificationService;
|
||||
use Illuminate\Http\JsonResponse;
|
||||
use Illuminate\Http\Request;
|
||||
use RuntimeException;
|
||||
|
||||
class StoreActivationController extends Controller
|
||||
{
|
||||
public function __construct(private InstallTokenService $tokens) {}
|
||||
public function __construct(
|
||||
private InstallTokenService $tokens,
|
||||
private WooNotificationService $notifications,
|
||||
) {}
|
||||
|
||||
public function activate(Request $request): JsonResponse
|
||||
{
|
||||
@@ -35,9 +39,14 @@ class StoreActivationController extends Controller
|
||||
return response()->json(['message' => 'Site URL does not match the connection request.'], 422);
|
||||
}
|
||||
|
||||
$wasPending = $store->status === WooStore::STATUS_PENDING;
|
||||
$pluginToken = $this->tokens->issuePluginToken($store);
|
||||
$store = $store->fresh();
|
||||
|
||||
if ($wasPending) {
|
||||
$this->notifications->storeConnected($store);
|
||||
}
|
||||
|
||||
StoreBootstrapSync::dispatch($store->id)->afterResponse();
|
||||
|
||||
return response()->json([
|
||||
|
||||
Reference in New Issue
Block a user