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 // A failed request is intentionally ignored so deactivation is never blocked 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 ), )); } // Redirect to the URL provided in the POST request if it exists if (isset($_POST['redirect'])) { wp_safe_redirect(esc_url_raw(wp_unslash($_POST['redirect']))); // Redirect to the specified URL exit; } wp_die(); }