So I have a configuration that a API returns a ?code=.....
to the URL inside my admin dashboard www.test/wp-admin
.
Is there a hook inside the admin where I can copy the admin url www.test/wp-admin?code=...
and redirect to a settings page?
I'm not asking to write code, I just want to be able to know if it's possible to determine if a query string is present on the admin page, to then redirect the user to a settings page.
Example:
API response returns back www.test/wp-admin?code=...
Copy the ?code
response and redirect user to www.test/wp-admin?page=instagram
and apply the ?code=...
response as www.test/wp-admin?page=instagram&code=....
.