Making WordPress.org

Opened 7 weeks ago

Last modified 5 weeks ago

#8214 new enhancement

Plugin/Theme Info API: Include closure reason and permanence for closed packages

Reported by: retlehs's profile retlehs Owned by:
Milestone: Priority: normal
Component: API Keywords:
Cc:

Description

The /plugins/info/1.2/ and /themes/info/1.2/ endpoints currently return {"error": "closed"} for all closed packages, with no distinction between closure types.

The WordPress.org HTML pages already display detailed closure information, e.g.:

  • "This plugin has been closed as of March 30, 2026 and is not available for download. This closure is permanent. Reason: Author Request."
  • "This plugin has been closed as of March 29, 2026 and is not available for download. This closure is temporary, pending a full review."

It would be helpful if the API response included this information, e.g.:

{
  "error": "closed",
  "closed_date": "2026-03-30",
  "closed_reason": "author-request",
  "closed_permanent": true
}

Use case: On WP Packages we poll the API to detect closures and re-openings. Without knowing whether a closure is permanent, we must continue polling permanently-closed packages indefinitely, generating unnecessary API traffic. A closed_permanent field would allow us to stop polling packages that will never return.

Change History (4)

#2 @retlehs
7 weeks ago

  • Type changed from defect (bug) to enhancement

#3 @dd32
6 weeks ago

This is already implemented for plugins, via #7057 (Note: It's V1.2+)

curl -s 'https://api.wordpress.org/plugins/info/1.2/?action=plugin_information&request[slug]=test-plugin-3' | jq .
{
  "error": "closed",
  "name": "Test Plugin 3 – Testing plugin",
  "slug": "test-plugin-3",
  "description": "This plugin has been closed as of September 3, 2025 and is not available for download. This closure is permanent. Reason: Author Request.",
  "closed": true,
  "closed_date": "2025-09-03",
  "reason": "author-request",
  "reason_text": "Author Request"
}

Other examples:

# Plugin closed a long time ago, no reason recoreded.
{
  "error": "closed",
  "name": "Example",
  "slug": "example",
  "description": "This plugin has been closed as of February 22, 2010 and is not available for download. Reason: Unknown.",
  "closed": true,
  "closed_date": "2010-02-22",
  "reason": "unknown",
  "reason_text": "Unknown"
}

# Plugin only just closed, for a Trademark complaint, author has X days to resolve before it's public.
{
  "error": "closed",
  "name": "Example",
  "slug": "example",
  "description": "This plugin has been closed as of March 29, 2026 and is not available for download. This closure is temporary, pending a full review.",
  "closed": true,
  "closed_date": "2026-03-29",
  "reason": false,
  "reason_text": false
}

This is only included for plugins whose close reason is public, as there's X days where it just shows "This closure is temporary" (except for Author request and unused which are immediate).

Themes do not currently track closure reason. I think we should tack that onto #5494.

#4 @retlehs
5 weeks ago

Thanks @dd32 — you're right, I missed the reason/reason_text fields in the response when making this ticket, apologies for the noise there!

Narrowing the ask: a dedicated closed_permanent boolean would let clients key on one stable field instead of parsing text

Happy to update this ticket to just that, and leave themes to #5494

Note: See TracTickets for help on using tickets.