From 715e26a9eb219808d5c899d418e1d596f9318f61 Mon Sep 17 00:00:00 2001
From: Jake Vanderwerf <get@jakevanderwerf.ca>
Date: Mon, 22 Jun 2026 16:59:19 +0000
Subject: [PATCH] =Debugging and implementing the Checkout.js logic. Will be uploading to test integration with square next.

---
 inc/blocks/FormBlock.php |    9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/inc/blocks/FormBlock.php b/inc/blocks/FormBlock.php
index 0d447da..c34fee8 100644
--- a/inc/blocks/FormBlock.php
+++ b/inc/blocks/FormBlock.php
@@ -35,6 +35,9 @@
 	{
 		$this->cache = Cache::for('forms', WEEK_IN_SECONDS);
 
+		if (JVB_TESTING) {
+			$this->cache->flush();
+		}
 		// Initialize forms from filter
 		$this->forms = $this->registerForms();
 		$this->form_contact = apply_filters('jvb_form_contact', '');
@@ -276,7 +279,7 @@
 			}
 		}
 
-		echo '<form id="' . esc_attr($form_id) . '" data-form-id="'.esc_attr($type).'" data-save="form">';
+		echo '<form id="' . esc_attr($form_id) . '" data-form-id="'.esc_attr($type).'" data-save="form" data-handled data-step>';
 //		wp_nonce_field('jvb_form_' . $type);
 	}
 
@@ -318,7 +321,7 @@
 		echo '<div class="container">';
 		if ($total > 1) {
 			echo '<div class="form-progress">';
-			jvbRenderProgressBar('<span class="step-text">Step <span class="current">1</span> of ' . $total . '</span>');
+			jvbRenderProgressBar('<span class="step-text">Step <span class="current">1</span> of ' . $total . '</span>', false, false);
 			echo '</div>';
 		}
 
@@ -332,7 +335,7 @@
 
 				echo '<button type="button" class="tab' . $active_class . '" data-tab="' . esc_attr($slug) . '" data-step="'.$i.'" role="tab" aria-selected="' . $aria_selected . '">';
 				echo '<span class="step-number">' . $i . '</span>';
-				echo '<h2>' . esc_html($section['label'] ?? $section) . '</h2>';
+				echo '<span>' . esc_html($section['label'] ?? $section) . '</span>';
 				echo '</button>';
 				$i++;
 			}

--
Gitblit v1.10.0