diff --git a/includes/cli/class-ras-esp-sync.php b/includes/cli/class-ras-esp-sync.php index 78e0a77d77..907c1e8ea2 100644 --- a/includes/cli/class-ras-esp-sync.php +++ b/includes/cli/class-ras-esp-sync.php @@ -178,6 +178,8 @@ private static function sync_contacts( $config ) { $result->get_error_message() ) ); + } elseif ( ! empty( static::$results ) ) { + static::$results['processed']++; } } } diff --git a/includes/reader-activation/sync/class-esp-sync.php b/includes/reader-activation/sync/class-esp-sync.php index ad9dc30f82..b802767e7b 100644 --- a/includes/reader-activation/sync/class-esp-sync.php +++ b/includes/reader-activation/sync/class-esp-sync.php @@ -238,12 +238,9 @@ public static function sync_contact( $user_id_or_order, $is_dry_run = false ) { // Translators: %1$s is the status and %2$s is the contact's email address. __( '%1$s contact data for %2$s.', 'newspack-plugin' ), $is_dry_run ? __( 'Would sync', 'newspack-plugin' ) : __( 'Synced', 'newspack-plugin' ), - $customer->get_email() + $contact['email'] ) ); - if ( ! empty( static::$results ) ) { - static::$results['processed']++; - } } return $result;