Skip to content

Stop other forms creating supporter posts, and add a command to clean them up [Develop] - #251

Merged
mlaetitia merged 6 commits into
developfrom
fix/T51ENG-2307-endorsement-empty-submissions-develop
Nov 4, 2026
Merged

mlaetitia merged 6 commits into
developfrom
fix/T51ENG-2307-endorsement-empty-submissions-develop

Conversation

@mlaetitia

@mlaetitia mlaetitia commented Nov 4, 2026 •

Copy link
Copy Markdown
Collaborator

Related to T51ENG-2307

Proposed changes

  • Only save supporters from the OSAID Endorsement form, and never without a name.
  • Adds CLI script wp osi-supporter-cleanup that trashes the supporter posts other forms created.

Why are these changes being made?

  • Every Contact Form 7 submission, from any form, was saved as a pending supporter post.

Testing instructions

  • Submit the newsletter form: no supporter post appears. Submit the endorsement form: one does.
  • Run wp osi-supporter-cleanup for a dry run, then --dry-run=false --limit=10 and check none of the trashed posts is a real endorsement.

🤖 Generated with Claude Code

mlaetitia and others added 6 commits November 4, 2026 11:38
…ut a name, so other forms stop creating empty supporter posts.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…s other forms created, with a dry run, limits and a timestamped log.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ype, so junk posts that carry a name are cleaned up too, and skip anything an admin created or edited.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…be removed with --limit=1, and count failed posts toward the limit so a failure never moves on to another post.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…a single value so new endorsements match.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@mlaetitia
mlaetitia merged commit 58675ab into develop Nov 4, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant