Skip to content

Posts: Replace wordpress/posts with v4/posts endpoint - #1227

Merged
n7studios merged 20 commits into
mainfrom
change-broadcasts-endpoint
Oct 9, 2026
Merged

n7studios merged 20 commits into
mainfrom
change-broadcasts-endpoint

Conversation

@n7studios

Copy link
Copy Markdown
Contributor

Summary

Updates the Kit WordPress Libraries to use the v4/posts API endpoint, instead of the legacy wordpress/posts endpoint, when fetching Broadcasts.

Library changes: Kit/convertkit-wordpress-libraries use-v4-api-posts-endpoint

Broadcasts block

  • Supports both wordpress/posts (url) and v4/posts (public_url) cached resource data, so existing cached Broadcasts continue to display until the resource is refreshed
  • Uses meta_description for the Broadcast's description
  • Outputs the title without a link if a Broadcast has no public URL

Broadcasts importer

  • Updates to the v4/posts/{id} response shape, where the Broadcast is nested in a post key
  • Uses meta_description as the Post's excerpt if description is null
  • Checks the access token once in refresh(), instead of for every Broadcast imported

HTML parser

  • v4/posts/{id} returns the Broadcast's content as a full HTML document. Adds an $is_html_document parameter to ConvertKit_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)
  • Broadcasts block, shortcode and Broadcasts to Posts tests (EndToEnd)

Checklist

@n7studios n7studios added this to the 3.4.7 milestone Oct 2, 2026
@n7studios n7studios self-assigned this Oct 2, 2026
@github-actions

github-actions Bot commented Oct 8, 2026

Copy link
Copy Markdown

WordPress Playground

🚀 Your PR has been built and is ready for testing in WordPress Playground!

Click here to test your changes in WordPress Playground

@n7studios
n7studios marked this pull request as ready for review October 8, 2026 08:17
@n7studios
n7studios requested review from a team, ciccio-kit and noelherrick and removed request for a team October 8, 2026 08:17
@n7studios
n7studios merged commit e829468 into main Oct 9, 2026
357 of 367 checks passed
@n7studios
n7studios deleted the change-broadcasts-endpoint branch October 15, 2026 04:41
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