Skip to content

Commit

Permalink
Merge pull request #64 from newfold-labs/p3-fix
Browse files Browse the repository at this point in the history
PRESS0-2121
  • Loading branch information
ramyakrishnai authored Aug 21, 2024
2 parents 853d4fa + 3da1f52 commit d84570b
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 8 deletions.
2 changes: 1 addition & 1 deletion bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -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' ) ) {
Expand Down
9 changes: 5 additions & 4 deletions includes/Services/InstaMigrateService.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class InstaMigrateService {
/**
* Retry count
*
* @var $count
* @var int $count
*/
private $count = 0;

Expand Down Expand Up @@ -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 ) );
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@newfold-labs/wp-module-migration",
"version": "1.0.10",
"version": "1.0.11",
"description": "",
"main": "build/index.js",
"scripts": {
Expand Down

0 comments on commit d84570b

Please sign in to comment.