From c204185ae86a98994f80010abf35a190c9406739 Mon Sep 17 00:00:00 2001
From: Jake Vanderwerf <get@jakevanderwerf.ca>
Date: Sun, 12 Jul 2026 18:08:19 +0000
Subject: [PATCH] =Refactor of Integrations.php. Separated different functionality into traits that classes can use to add that functionality. Hopefully will make maintaining it a little easier. Still have to finish up, as well as refactoring the individual classes to utilize the new system.
---
inc/ui/Checkout.php | 12 +++++++-----
1 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/inc/ui/Checkout.php b/inc/ui/Checkout.php
index ad21146..82c96a6 100644
--- a/inc/ui/Checkout.php
+++ b/inc/ui/Checkout.php
@@ -31,11 +31,13 @@
{
public static function getProvider():Integrations|false
{
- foreach (Site::getIntegrations() as $integration => $active) {
- if (in_array($integration, ['square', 'helcim']) && $active) {
- return JVB()->connect($integration);
- }
- }
+ $int = ['square','helcim'];
+ foreach ($int as $i) {
+ if (Site::hasIntegration($i)) {
+ error_log('Site has '.$i);
+ return JVB()->connect($i);
+ }
+ }
return false;
}
/**
--
Gitblit v1.10.0