File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -106,6 +106,7 @@ public static function instance() {
106106 add_filter ( 'optimole_wp_feedback_review_message ' , [ __CLASS__ , 'change_review_message ' ] );
107107 add_filter ( 'optimole_wp_logger_heading ' , [ __CLASS__ , 'change_review_message ' ] );
108108 add_filter ( 'optml_register_conflicts ' , [ __CLASS__ , 'register_conflicts ' ] );
109+ add_filter ( 'optimole_wp_logger_data ' , [ __CLASS__ , 'add_settings ' ] );
109110 self ::$ _instance = new self ();
110111 self ::$ _instance ->manager = Optml_Manager::instance ();
111112 self ::$ _instance ->rest = new Optml_Rest ();
@@ -145,6 +146,20 @@ public static function register_conflicts( $conflicts_to_register = [] ) {
145146 return $ conflicts_to_register ;
146147 }
147148
149+ /**
150+ * Add settings to the logger data.
151+ *
152+ * @param array $data Logger data.
153+ *
154+ * @return array
155+ */
156+ public static function add_settings ( $ data ): array {
157+ $ saved_data = ( new Optml_Settings () )->get_raw_settings ();
158+ unset( $ saved_data ['service_data ' ] );
159+ unset( $ saved_data ['api_key ' ] );
160+
161+ return array_merge ( $ data , $ saved_data );
162+ }
148163 /**
149164 * Change review message.
150165 *
You can’t perform that action at this time.
0 commit comments