Skip to content

Commit

Permalink
Merge pull request #2 from jishat/jishat
Browse files Browse the repository at this point in the history
chore: add plugin slug & version in Feedback
  • Loading branch information
shuvomohajan authored Oct 9, 2024
2 parents 1e61cb9 + 45a0479 commit 6d9f557
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/Telemetry/Feedback/Feedback.php
Original file line number Diff line number Diff line change
Expand Up @@ -120,9 +120,12 @@ public function handleDeactivateFeedback()
}

$report = [];
$report['url'] = esc_url(home_url());
$report['site_lang'] = get_bloginfo('language');
$report['feedback_key'] = sanitize_text_field(wp_unslash($_POST['reason_key'])) ?: null;
$report['feedback'] = sanitize_text_field(wp_unslash($_POST["reason_{$report['feedback_key']}"])) ?: null;
$report['plugin_slug'] = TelemetryConfig::getPrefix();
$report['plugin_version'] = TelemetryConfig::getversion();

Telemetry::sendReport('deactivate-reason', $report);

Expand Down

0 comments on commit 6d9f557

Please sign in to comment.