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/includes/Services/InstaMigrateService.php b/includes/Services/InstaMigrateService.php index 6809f59..53944ba 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 ) ); 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": {