I am trying to update my WordPress plugins automatically using transient. I have one that works but it adds authorize_token to query params like below code.
$new_files = $this->github_response['zipball_url']; // Get the ZIP
***$package = add_query_arg(array("access_token" => $this->authorize_token), $new_files);***
$slug = current( explode('/', $this->basename ) ); // Create valid slug
$plugin = array( // setup our plugin info
'url' => $this->plugin["PluginURI"],
'slug' => $slug,
'package' => $package,
'new_version' => $this->github_response['tag_name']
);
$transient->response[$this->basename] = (object) $plugin;
but i have received email from github that says i should add authorize_token to header.
I'm trying to find solution by google, but i can't find it. How can I fix it?