From 4089ba01e0881c89a72332e13bc3a80b6bddec2a Mon Sep 17 00:00:00 2001
From: Jake Vanderwerf <get@jakevanderwerf.ca>
Date: Mon, 29 Jun 2026 22:15:55 +0000
Subject: [PATCH] =DashboardManager overhaul. A bit easier to modify the output of pages. Still have to get the account pages to work as expected, as well as verify the integrations and others are working - but registrar/content pages work as expected. Also fixed up the table generation in CRUD.js and CRUDSkeleton.php
---
inc/rest/routes/IntegrationsSquareRoutes.php | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/inc/rest/routes/IntegrationsSquareRoutes.php b/inc/rest/routes/IntegrationsSquareRoutes.php
index 4734a65..ea338e1 100644
--- a/inc/rest/routes/IntegrationsSquareRoutes.php
+++ b/inc/rest/routes/IntegrationsSquareRoutes.php
@@ -47,6 +47,7 @@
{
$data = $request->get_json_params();
+
// Generate idempotency key from cart_id + timestamp
// This ensures retries use SAME key
$cart_id = $data['cart_id'] ?? '';
@@ -146,9 +147,10 @@
public function getSavedCards(WP_REST_Request $request):WP_REST_Response
{
$data = $request->get_params();
+ error_log('Getting Saved Cards: '.print_r($data, true));
$user_id = absint($data['user']??0);
if ($user_id === 0) {
- return $this->validationError(['message' => 'Not logged in']);
+ return $this->success(['cards' => []]);
}
$square = JVB()->connect('square');
--
Gitblit v1.10.0