From df1c4e30c46e12750a85b0f020ad35c80b9aac71 Mon Sep 17 00:00:00 2001
From: girishpanchal30 <girish@krishaweb.com>
Date: Tue, 20 Aug 2024 11:16:47 +0530
Subject: [PATCH 1/4] Fix PHP fatal error

---
 includes/admin/models/class-rop-services-model.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/includes/admin/models/class-rop-services-model.php b/includes/admin/models/class-rop-services-model.php
index df75f0578..74185c4d1 100644
--- a/includes/admin/models/class-rop-services-model.php
+++ b/includes/admin/models/class-rop-services-model.php
@@ -496,7 +496,7 @@ public function find_account( $account_id ) {
 
 		list( $service, $service_id, $user_id ) = $this->handle_underscore_exception( $account_id );
 
-		if ( count( $services[ $service . '_' . $service_id ]['available_accounts'] ) >= 1 ) {
+		if ( ! empty( $services[ $service . '_' . $service_id ]['available_accounts'] ) && count( $services[ $service . '_' . $service_id ]['available_accounts'] ) >= 1 ) {
 			foreach ( $services[ $service . '_' . $service_id ]['available_accounts'] as $key => $account ) {
 				if ( $account['id'] == $user_id ) {
 					$response = array(

From 5bc460df370b966e259624e6607e7c1e7fa19fce Mon Sep 17 00:00:00 2001
From: girishpanchal30 <girish@krishaweb.com>
Date: Thu, 22 Aug 2024 10:45:53 +0530
Subject: [PATCH 2/4] chore: update fb graph api version

---
 includes/admin/services/class-rop-facebook-service.php | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/includes/admin/services/class-rop-facebook-service.php b/includes/admin/services/class-rop-facebook-service.php
index 81aeece15..7761aa2d9 100644
--- a/includes/admin/services/class-rop-facebook-service.php
+++ b/includes/admin/services/class-rop-facebook-service.php
@@ -761,9 +761,9 @@ private function try_post( $new_post, $page_id, $token, $post_id, $posting_type
 			$post_data['access_token'] = $token;
 
 			if ( 'video' === $posting_type ) {
-				$url = 'https://graph-video.facebook.com/v12.0' . $path;
+				$url = 'https://graph-video.facebook.com/v16.0' . $path;
 			} else {
-				$url = 'https://graph.facebook.com/v12.0' . $path;
+				$url = 'https://graph.facebook.com/v16.0' . $path;
 			}
 
 			// Scrape post URL before sharing

From 667a4c5b465e9aa3c4871b0ac7aeb9e05efaf064 Mon Sep 17 00:00:00 2001
From: girishpanchal30 <girish@krishaweb.com>
Date: Thu, 22 Aug 2024 12:09:10 +0530
Subject: [PATCH 3/4] Set latest graph api version

---
 includes/admin/services/class-rop-facebook-service.php | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/includes/admin/services/class-rop-facebook-service.php b/includes/admin/services/class-rop-facebook-service.php
index 7761aa2d9..b06f40197 100644
--- a/includes/admin/services/class-rop-facebook-service.php
+++ b/includes/admin/services/class-rop-facebook-service.php
@@ -163,7 +163,7 @@ public function set_api( $app_id = '', $secret = '' ) {
 				array(
 					'app_id'                => $this->strip_whitespace( $app_id ),
 					'app_secret'            => $this->strip_whitespace( $secret ),
-					'default_graph_version' => 'v16.0',
+					'default_graph_version' => 'v20.0',
 				)
 			);
 		} catch ( Exception $exception ) {
@@ -761,9 +761,9 @@ private function try_post( $new_post, $page_id, $token, $post_id, $posting_type
 			$post_data['access_token'] = $token;
 
 			if ( 'video' === $posting_type ) {
-				$url = 'https://graph-video.facebook.com/v16.0' . $path;
+				$url = 'https://graph-video.facebook.com/v20.0' . $path;
 			} else {
-				$url = 'https://graph.facebook.com/v16.0' . $path;
+				$url = 'https://graph.facebook.com/v20.0' . $path;
 			}
 
 			// Scrape post URL before sharing

From f0c7a0de3a5975181010024fdbbc270fa78108ea Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Mon, 26 Aug 2024 02:26:48 +0000
Subject: [PATCH 4/4] chore(deps): bump codeinwp/themeisle-sdk from 3.3.25 to
 3.3.29

Bumps [codeinwp/themeisle-sdk](https://github.com/Codeinwp/themeisle-sdk) from 3.3.25 to 3.3.29.
- [Release notes](https://github.com/Codeinwp/themeisle-sdk/releases)
- [Changelog](https://github.com/Codeinwp/themeisle-sdk/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Codeinwp/themeisle-sdk/compare/v3.3.25...v3.3.29)

---
updated-dependencies:
- dependency-name: codeinwp/themeisle-sdk
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
---
 composer.lock | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/composer.lock b/composer.lock
index 68282c171..470feb4c1 100644
--- a/composer.lock
+++ b/composer.lock
@@ -70,16 +70,16 @@
         },
         {
             "name": "codeinwp/themeisle-sdk",
-            "version": "3.3.25",
+            "version": "3.3.29",
             "source": {
                 "type": "git",
                 "url": "https://github.com/Codeinwp/themeisle-sdk.git",
-                "reference": "29b7c81f8ccd039f49d62ef7427a4cc06369becc"
+                "reference": "4d63bc81ec0357c8675dac1e35511fd81104605d"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/Codeinwp/themeisle-sdk/zipball/29b7c81f8ccd039f49d62ef7427a4cc06369becc",
-                "reference": "29b7c81f8ccd039f49d62ef7427a4cc06369becc",
+                "url": "https://api.github.com/repos/Codeinwp/themeisle-sdk/zipball/4d63bc81ec0357c8675dac1e35511fd81104605d",
+                "reference": "4d63bc81ec0357c8675dac1e35511fd81104605d",
                 "shasum": ""
             },
             "require-dev": {
@@ -104,9 +104,9 @@
             ],
             "support": {
                 "issues": "https://github.com/Codeinwp/themeisle-sdk/issues",
-                "source": "https://github.com/Codeinwp/themeisle-sdk/tree/v3.3.25"
+                "source": "https://github.com/Codeinwp/themeisle-sdk/tree/v3.3.29"
             },
-            "time": "2024-07-08T13:49:14+00:00"
+            "time": "2024-08-21T08:03:45+00:00"
         },
         {
             "name": "composer/ca-bundle",