PluginProbe
Search Atlas SEO – OTTO AI SEO Automation for WordPress / 2.7.1
Search Atlas SEO – OTTO AI SEO Automation for WordPress v2.7.1
2.7.1 2.7.2 2.7.0 2.6.26 2.6.25 2.6.24 2.6.23 2.6.22 2.6.21 2.6.20 2.6.19 2.6.18 2.6.17 2.6.16 2.6.15 2.6.14 2.6.13 2.6.12 2.6.11 2.6.10 2.6.9 2.6.8 2.6.7 2.6.6 2.6.5 All 141 releases
← All changes | telemetry/sentry-wordpress-integration.php +1 -42 2.7.2 → 2.7.1 View file →
@@ -243,12 +243,8 @@
243 243 } else {
244 244 $event_data['tags'] = ['category' => 'user-feedback'];
245 245 }
246 246
247 - // Attach white-label metadata to the issue-report event (not only the
248 - // user-feedback item) so support can identify the reporting site.
249 - $event_data = self::apply_white_label_context($event_data, $feedback);
250 -
251 247 // Send the event first with attachment
252 248 $event_result = $this->sendToSentry($event_data, 'event', $attachment);
253 249
254 250 // Extract event_id from response
@@ -273,46 +269,9 @@
273 269 $feedback_result = $this->sendToSentry($data, 'user_report');
274 270
275 271 return is_array($feedback_result) ? $feedback_result['success'] : $feedback_result;
276 272 }
277 -
278 - /**
279 - * Attach white-label metadata to an issue-report event payload.
280 - *
281 - * Support needs to tell from the Sentry event alone whether the reporting
282 - * site is white-labeled, so the values go on the event itself (tags plus a
283 - * white_label context), not only on the associated user-feedback item.
284 - *
285 - * Static and public so the unit suite can exercise the mapping directly;
286 - * captureFeedback() runs the result through a private curl sender that has
287 - * no test seam.
288 - *
289 - * @param array $event_data Event payload built by formatMessage().
290 - * @param array $feedback Feedback data supplied by the report handler.
291 - * @return array The event payload with white-label tags and context added.
292 - */
293 - public static function apply_white_label_context(array $event_data, array $feedback)
294 - {
295 - $is_whitelabel = !empty($feedback['is_whitelabel']);
296 - $brand_name = isset($feedback['whitelabel_brand_name'])
297 - ? sanitize_text_field($feedback['whitelabel_brand_name']) : '';
298 - $support_email = isset($feedback['whitelabel_support_email'])
299 - ? sanitize_email($feedback['whitelabel_support_email']) : '';
300 - $site_url = isset($feedback['site_url']) ? esc_url_raw($feedback['site_url']) : '';
301 - $event_data['tags']['is_whitelabel'] = $is_whitelabel ? 'true' : 'false';
302 - $event_data['tags']['whitelabel_brand_name'] = $brand_name;
303 - $event_data['tags']['whitelabel_support_email'] = $support_email;
304 - $event_data['tags']['site_url'] = $site_url;
305 - $event_data['contexts']['white_label'] = array(
306 - 'is_whitelabel' => $is_whitelabel,
307 - 'whitelabel_brand_name' => $brand_name,
308 - 'whitelabel_support_email' => $support_email,
309 - 'site_url' => $site_url,
310 - );
311 -
312 - return $event_data;
313 - }
314 -
273 +
315 274 /**
316 275 * Format exception data for Sentry API
317 276 */
318 277 private function formatException($exception, $extra = []) {