$player, 'message' => $message ]; $args = [ 'body' => json_encode($data), 'headers' => [ 'Content-Type' => 'application/json', 'X-API-Key' => $api_secret, ], 'timeout' => 2, 'data_format' => 'body', ]; wp_remote_post($url, $args); }