From 190a6098a2dc8673a4ff1a5cf3c25216f9c1785f Mon Sep 17 00:00:00 2001 From: Ramya krishna Date: Wed, 21 Aug 2024 12:56:29 +0530 Subject: [PATCH 1/3] Added suggested changes --- includes/Services/InstaMigrateService.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/includes/Services/InstaMigrateService.php b/includes/Services/InstaMigrateService.php index 6809f59..a382212 100644 --- a/includes/Services/InstaMigrateService.php +++ b/includes/Services/InstaMigrateService.php @@ -28,7 +28,7 @@ class InstaMigrateService { /** * Retry count * - * @var $count + * @var int $count */ private $count = 0; @@ -81,9 +81,10 @@ public function install_instawp_connect() { if ( function_exists( 'instawp' ) ) { // Check if there is a connect ID if ( empty( Helper::get_connect_id() ) ) { - if ( $count < 2 ) { - $count++; - delete_option( 'instawp_api_options' ); + if ( $this->count < 3 ) { + $this->count++; + delete_option( 'instawp_api_options' ); // delete the connection to plugin and website + sleep( 1 ); self::install_instawp_connect(); } else { return new \WP_Error( 'Bad request', esc_html__( 'Connect plugin is installed but no connect ID.' ), array( 'status' => 400 ) ); From 74fda85fba437243a99784b8fae131b3648142b5 Mon Sep 17 00:00:00 2001 From: Ramya krishna Date: Wed, 21 Aug 2024 14:09:49 +0530 Subject: [PATCH 2/3] linting --- includes/Services/InstaMigrateService.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/Services/InstaMigrateService.php b/includes/Services/InstaMigrateService.php index a382212..53944ba 100644 --- a/includes/Services/InstaMigrateService.php +++ b/includes/Services/InstaMigrateService.php @@ -82,7 +82,7 @@ public function install_instawp_connect() { // Check if there is a connect ID if ( empty( Helper::get_connect_id() ) ) { if ( $this->count < 3 ) { - $this->count++; + ++$this->count; delete_option( 'instawp_api_options' ); // delete the connection to plugin and website sleep( 1 ); self::install_instawp_connect(); From 3da1f52cca0ee1fe3a3fd6ca46e0e6d815d2c8a0 Mon Sep 17 00:00:00 2001 From: Ramya krishna Date: Wed, 21 Aug 2024 19:27:20 +0530 Subject: [PATCH 3/3] migration module version bump --- bootstrap.php | 2 +- package-lock.json | 4 ++-- package.json | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/bootstrap.php b/bootstrap.php index dc19587..b7767a5 100644 --- a/bootstrap.php +++ b/bootstrap.php @@ -22,7 +22,7 @@ function () { 'callback' => function ( Container $container ) { if ( ! defined( 'NFD_MIGRATION_MODULE_VERSION' ) ) { - define( 'NFD_MIGRATION_MODULE_VERSION', '1.0.10' ); + define( 'NFD_MIGRATION_MODULE_VERSION', '1.0.11' ); } $brand = $container->plugin()->id; if ( 'atomic' === getContext( 'platform' ) ) { diff --git a/package-lock.json b/package-lock.json index c224658..b36ab78 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@newfold-labs/wp-module-migration", - "version": "1.0.10", + "version": "1.0.11", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@newfold-labs/wp-module-migration", - "version": "1.0.10", + "version": "1.0.11", "license": "GPL-2.0-or-later", "dependencies": { "@heroicons/react": "^2.0.18", diff --git a/package.json b/package.json index eb8333f..78b26d4 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@newfold-labs/wp-module-migration", - "version": "1.0.10", + "version": "1.0.11", "description": "", "main": "build/index.js", "scripts": {