Skip to content

Destructive abilities use DELETE method but WP 7.0 Abilities API requires POST #226

Description

@jaustindavid

What happened?

The revision-cleanup ability runs and deletes old revisions.

Environment

  • Plugin version: v0.11.0 (release ZIP)
  • WordPress: 7.0
  • PHP: 8.2.31
  • Browser: Chrome (recent), local WebLLM (Qwen 3 1.7B) backend
  • Host: shared host (SiteGround)

Steps to reproduce

  • Install v0.11.0 release ZIP on a WP 7.0 site, activate.
  • Open Agentic Admin, prompt: "Clean up post revisions older than 90 days."
  • Confirmation dialog appears as expected (safety check working — nice).
  • Approve.

Issue might be WP7 only wanting GET or POST. Changing src/extensions/services/abilities-api.js : 167 seems to fix it

getHttpMethod( ability ) {
return this.isReadOnly( ability ) ? 'GET' : 'POST';
}

What did you expect?

I expected a positive outcome :)

Browser

Chrome

Console errors (if any)

{
  "error": "Abilities that perform updates require POST method."
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions