Repository navigation
Posts: Replace wordpress/posts with v4/posts endpoint - #1227
Merged
Merged
Conversation
Each uses slightly different keys for Posts.
Reflects the new shape returned by `v4/posts/{id}` vs. the existing `wordpress/posts/{id}`. Safe to change as we only cache `v4/posts` or `wordpress/posts` in the resource class. For a single broadcast, we always query the API to fetch the content and product_id.
…ange-broadcasts-endpoint
WordPress Playground🚀 Your PR has been built and is ready for testing in WordPress Playground! |
n7studios
marked this pull request as ready for review
October 8, 2026 08:17
n7studios
requested review from
a team,
ciccio-kit and
noelherrick
and removed request for
a team
October 8, 2026 08:17
noelherrick
approved these changes
Oct 8, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Updates the Kit WordPress Libraries to use the
v4/postsAPI endpoint, instead of the legacywordpress/postsendpoint, when fetching Broadcasts.Library changes: Kit/convertkit-wordpress-libraries
use-v4-api-posts-endpointBroadcasts block
wordpress/posts(url) andv4/posts(public_url) cached resource data, so existing cached Broadcasts continue to display until the resource is refreshedmeta_descriptionfor the Broadcast's descriptionBroadcasts importer
v4/posts/{id}response shape, where the Broadcast is nested in apostkeymeta_descriptionas the Post's excerpt ifdescriptionis nullrefresh(), instead of for every Broadcast importedHTML parser
v4/posts/{id}returns the Broadcast's content as a full HTML document. Adds an$is_html_documentparameter toConvertKit_HTML_Parser, which inserts the UTF-8 Content-Type meta tag into the document's existing<head>, instead of wrapping the document in another<html>document (which would output the Broadcast's<head>elements within the<body>)Testing
Existing tests cover this change, and pass:
BroadcastsImportTest(Integration)Checklist