Skip to content

Revoke and Remove Tokens on Uninstall#283

Merged
n7studios merged 2 commits intorevoke-remove-tokens-disconnectfrom
revoke-remove-tokens-uninstall
Apr 13, 2026
Merged

Revoke and Remove Tokens on Uninstall#283
n7studios merged 2 commits intorevoke-remove-tokens-disconnectfrom
revoke-remove-tokens-uninstall

Conversation

@n7studios
Copy link
Copy Markdown
Contributor

Summary

When the user uninstalls the Kit for WooCommerce Plugin from their WordPress Site:

  • Revokes the access and refresh tokens by calling the oauth/revoke endpoint
  • Removes the v3 API Key, v3 Secret, v4 Access Token, v4 Refresh Token and v4 Token Expires settings from the database.

https://developer.wordpress.org/plugins/plugin-basics/uninstall-methods/ defines "Uninstall" as:

A plugin is considered uninstalled if a user has deactivated the plugin, and then clicks the delete link within the WordPress Admin.

Testing

  • testPluginDeletionRevokesAndRemovesTokens : test that uninstalling (deleting) the Plugin revokes and removes tokens.

Checklist

@n7studios n7studios self-assigned this Apr 10, 2026
@n7studios n7studios changed the base branch from main to revoke-remove-tokens-disconnect April 10, 2026 08:30
@n7studios n7studios requested review from a team, ciccio-kit and noelherrick and removed request for a team April 10, 2026 09:20
@n7studios n7studios marked this pull request as ready for review April 10, 2026 09:20
@n7studios n7studios merged commit 1f16bb7 into revoke-remove-tokens-disconnect Apr 13, 2026
152 of 156 checks passed
@n7studios n7studios deleted the revoke-remove-tokens-uninstall branch April 23, 2026 02:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants