Skip to content

Conversation

@n7studios
Copy link
Contributor

@n7studios n7studios commented Dec 12, 2025

Summary

Implements Kit/convertkit-wordpress#964 and Kit/convertkit-wordpress#966 from the main Kit Plugin:

  • move token hook logic to functions.php,
  • checks the result of any refresh() call, forcibly removing credentials from the Plugin's settings if the failure is a 401
  • on initialization of a resource class, such as Integrate_ConvertKit_WPForms_Resource_Forms, removes the ConvertKit_Resource_V4 init() call and loads cached resources.

All calls made to refresh() from the Plugin are made by the user when editing a WPForms Form and configuring the Marketing > Kit section:

Screenshot 2025-12-12 at 23 27 25

Testing

  • testAccessTokenDeletedWhenInvalid: Confirm the the access token is deleted when a call to refresh() is made.
  • testInvalidCredentials: Confirm that a notice is displayed in the WordPress administration UI when an invalid access token was used

Checklist

@n7studios n7studios self-assigned this Dec 12, 2025
@n7studios n7studios added the enhancement New feature or request label Dec 12, 2025
@n7studios n7studios requested review from a team, ciccio-kit and noelherrick and removed request for a team December 15, 2025 10:09
@n7studios n7studios marked this pull request as ready for review December 15, 2025 10:09
break;

default:
$output = '';

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line appears unnecessary.

@n7studios n7studios merged commit d68f15f into main Dec 16, 2025
24 checks passed
@n7studios n7studios deleted the delete-tokens-401 branch December 22, 2025 10:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants