915042170, 'user_name' => sanitize_text_field($current_user->display_name), // Sanitize the user's display name 'user_email' => sanitize_email($current_user->user_email), // Sanitize the user's email 'user_site' => esc_url_raw(get_home_url()), // Sanitize and escape the URL of the user's site 'reason' => $unslashed_reason, // Sanitize the reason for deactivation ); // Send the sanitized data to the webhook URL $response = wp_remote_post($webhook_url, array( 'method' => 'POST', 'body' => wp_json_encode($data), // Convert sanitized data to JSON 'headers' => array( 'Content-Type' => 'application/json', // Set the content type to JSON ), )); // Log an error if the request to Google Sheets fails if (is_wp_error($response)) { error_log('Error sending data to Google Sheets: ' . $response->get_error_message()); } } // Redirect to the URL provided in the POST request if it exists if (isset($_POST['redirect'])) { wp_redirect(esc_url_raw(wp_unslash($_POST['redirect']))); // Redirect to the specified URL exit; } wp_die(); } function zlgcb_display_plugin_notice_box() { // Check if the notice has already been dismissed or reviewed if (isset($_COOKIE['zlgcb_counter_plugin_notice_dismissed']) || isset($_COOKIE['zlgcb_counter_plugin_review_done'])) { return; // Don't show the notice if cookies are set } // Output the plugin notice box with static HTML echo wp_kses_post( '
' . esc_html__('Thank you for using our plugin! We would love to hear your feedback.', 'block-metrics-animated-state-counter') . '