From 97e7c319d656a5f05489ca996e249e7359303d4d Mon Sep 17 00:00:00 2001
From: Jake Vanderwerf <get@jakevanderwerf.ca>
Date: Sun, 31 May 2026 22:42:33 +0000
Subject: [PATCH] =Jakevan edits done?

---
 inc/integrations/GoogleMyBusiness.php |   26 +++++++++++++-------------
 1 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/inc/integrations/GoogleMyBusiness.php b/inc/integrations/GoogleMyBusiness.php
index 2e97d01..9e86377 100644
--- a/inc/integrations/GoogleMyBusiness.php
+++ b/inc/integrations/GoogleMyBusiness.php
@@ -1,7 +1,7 @@
 <?php
 namespace JVBase\integrations;
 
-use JVBase\meta\MetaManager;
+use JVBase\meta\Meta;
 use WP_Error;
 if (!defined('ABSPATH')) {
 	exit;
@@ -282,7 +282,7 @@
 		}
 
 		$postID = $data['post_id'];
-		$meta = new MetaManager($postID, 'post');
+		$meta = Meta::forPost($postID);
 		$fields = [
 			'start_date',
 			'end_date',
@@ -318,7 +318,7 @@
 			$result =  $this->updatePost($fields["_{$this->service_name}_item_id"], $data);
 		} else {
 			$result = $this->createPost($data);
-			$meta->updateValue("_{$this->service_name}_item_id", $result['name']);
+			$meta->set("_{$this->service_name}_item_id", $result['name']);
 		}
 
 		return [
@@ -339,7 +339,7 @@
 		}
 
 		$postID = $data['post_id'];
-		$meta = new MetaManager($postID, 'post');
+		$meta = Meta::forPost($postID);
 		$fields = [
 			'post_excerpt',
 			'post_title',
@@ -371,7 +371,7 @@
 			$result =  $this->updatePost($fields["_{$this->service_name}_item_id"], $data);
 		} else {
 			$result = $this->createPost($data);
-			$meta->updateValue("_{$this->service_name}_item_id", $result['name']);
+			$meta->set("_{$this->service_name}_item_id", $result['name']);
 		}
 
 		return [
@@ -393,7 +393,7 @@
 		}
 
 		$postID = $data['post_id'];
-		$meta = new MetaManager($postID, 'post');
+		$meta = Meta::forPost($postID);
 		$fields = [
 			'post_excerpt',
 			'post_title',
@@ -422,7 +422,7 @@
 			$result =  $this->updatePost($fields["_{$this->service_name}_item_id"], $data);
 		} else {
 			$result = $this->createPost($data);
-			$meta->updateValue("_{$this->service_name}_item_id", $result['name']);
+			$meta->set("_{$this->service_name}_item_id", $result['name']);
 		}
 
 		return [
@@ -2470,7 +2470,7 @@
 	protected function collectMenu(array $menu_items): array
 	{
 
-		$defaultMeta = new MetaManager($this->userID, 'integrations');
+		$defaultMeta = Meta::forOptions($this->userID.'_integrations');
 		$defaults = ['menu_name', 'menu_description', 'default_section', 'cuisines', 'source_url', 'language', 'default_currency'];
 		$defaults = $defaultMeta->getAll($defaults);
 
@@ -2531,7 +2531,7 @@
 
 	protected function buildMenuItem(\WP_Post $item, array $defaults):array
 	{
-		$meta = new MetaManager($item->ID, 'post');
+		$meta = Meta::forPost($item->ID);
 		$fields = $this->mappedMenuFields($item->post_type);
 		$values = $meta->getAll(array_values($fields));
 
@@ -2660,8 +2660,8 @@
 
 	protected function getMenuSectionsOrder(array $sections_map):array
 	{
-		$optionsMeta = new MetaManager(null, 'options');
-		$sectionOrder = $optionsMeta->getValue('menu_section_order');
+		$optionsMeta = Meta::forOptions('options');
+		$sectionOrder = $optionsMeta->get('menu_section_order');
 
 		// Build final GMB menu structure
 		$ordered = [];
@@ -2697,8 +2697,8 @@
 
 		// Collect cuisines from individual items if specified
 		foreach ($menu_items as $item) {
-			$meta = new MetaManager($item->ID, 'post');
-			$item_cuisines = $meta->getValue('cuisines');
+			$meta = Meta::forPost($item->ID);
+			$item_cuisines = $meta->get('cuisines');
 
 			if (!empty($item_cuisines)) {
 				$item_cuisines = is_array($item_cuisines) ?

--
Gitblit v1.10.0