Skip to content

Add Kit WP App Server support - #137

Open
n7studios wants to merge 5 commits into
mainfrom
kit-wp-app-server
Open

n7studios wants to merge 5 commits into
mainfrom
kit-wp-app-server

Conversation

@n7studios

Copy link
Copy Markdown
Contributor

Summary

Adds the ConvertKit_App_Server class, so Kit WordPress Plugins can connect through the Kit WP App Server and work as Kit App Store apps. Kit for WooCommerce is the first Plugin to use it.

The class provides:

  • get_redirect_uri(), get_connect_url() and get_complete_url(): the App Server URLs for the Kit OAuth connect and install flow.
  • allowed_redirect_hosts(): lets wp_safe_redirect() redirect to the App Server.
  • register_site() and unregister_site(): register the site with the App Server on connect, including the one-time registration token the App Server sends with the authorization code, and unregister it on disconnect.
  • heartbeat(): tells the App Server the site is still active.
  • send_automation_event(): sends automation events (e.g. abandoned checkout, product purchased) to the App Server, which passes them on to Kit.

Each request includes the Plugin, WordPress and dependency versions passed to the constructor. Requests authenticate with the site secret returned by register_site(). A failed request, or a response with an unexpected status code, returns a WP_Error that includes the HTTP status.

Testing

AppServerTest covers the URLs, allowed redirect hosts, registering (with and without a registration token), unregistering, heartbeat, automation events (with and without context), the versions sent with each request, and unexpected response codes.

Checklist

@n7studios n7studios added this to the 2.9.0 milestone Nov 10, 2026
@n7studios n7studios self-assigned this Nov 10, 2026
@n7studios n7studios added the enhancement New feature or request label Nov 10, 2026
@n7studios
n7studios marked this pull request as ready for review November 11, 2026 07:46
@n7studios
n7studios requested review from a team, ciccio-kit and noelherrick and removed request for a team November 11, 2026 07:46
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.

1 participant