You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
add_settings_error( 'tptn-notices', '', esc_html__( 'Funnel has been synced. Buffered visits have been aggregated.', 'top-10' ), 'updated' );
172
-
} else {
173
-
add_settings_error( 'tptn-notices', '', esc_html__( 'Nothing to sync. The funnel is empty or another sync is in progress.', 'top-10' ), 'updated' );
172
+
} elseif ( 0 === $result ) {
173
+
add_settings_error( 'tptn-notices', '', esc_html__( 'Nothing to sync. The funnel is empty.', 'top-10' ), 'updated' );
174
+
} elseif ( false === $result ) {
175
+
add_settings_error( 'tptn-notices', '', esc_html__( 'Sync skipped: another aggregation is already in progress. Please try again in a moment.', 'top-10' ), 'updated' );
176
+
} elseif ( is_wp_error( $result ) ) {
177
+
add_settings_error(
178
+
'tptn-notices',
179
+
'',
180
+
sprintf(
181
+
/* translators: %s: error message from the database */
182
+
esc_html__( 'Sync failed: %s', 'top-10' ),
183
+
esc_html( $result->get_error_message() )
184
+
),
185
+
'error'
186
+
);
174
187
}
175
188
}
176
189
@@ -563,6 +576,7 @@ public static function get_db_status_report() {
563
576
printf(
564
577
/* translators: %s: human-readable time difference */
565
578
esc_html__( 'Next run: %s', 'top-10' ),
579
+
/* translators: %s: human-readable time difference */
0 commit comments