diff --git a/includes/Services/FlowService.php b/includes/Services/FlowService.php index 7daefa8..1e8c530 100644 --- a/includes/Services/FlowService.php +++ b/includes/Services/FlowService.php @@ -91,6 +91,9 @@ public static function get_data() { $result = self::get_default_data(); self::update_data_in_wp_option( $result ); } + + $result = SiteGenService::reset_error_status( $result ); + return $result; } diff --git a/includes/Services/SiteGenService.php b/includes/Services/SiteGenService.php index b613e2d..ac9371f 100644 --- a/includes/Services/SiteGenService.php +++ b/includes/Services/SiteGenService.php @@ -1157,4 +1157,18 @@ public static function sync_flow_data( $updated_data ) { $data['sitegen']['homepages']['data'] = $updated_data; FlowService::update_data_in_wp_option( $data ); } + + /** + * Reset the error status in the flow data. + * + * @param array $data The flow data. + * @return array + */ + public static function reset_error_status( $data ) { + if ( isset( $data['sitegen']['siteGenErrorStatus'] ) && true === $data['sitegen']['siteGenErrorStatus'] ) { + $data['sitegen']['siteGenErrorStatus'] = false; + } + + return $data; + } }