Correct README inaccuracies around Stripe lapsing and plugin structure#10
Merged
Conversation
The README claimed payments were identified by Stripe charge metadata `id = "join-gmtu"` — a pre-Stripe Action Network hangover. The actual code in StripePaymentHistory.php matches subscription line items' product IDs against configured membership plan product IDs read from the `ck_join_flow_membership_plan_*` wp_options rows.
The README said the payment history came from the Stripe Charges API. StripePaymentHistory.php actually uses the Customers, Subscriptions, and Invoices APIs; there is no Charges call anywhere in the codebase.
The README said "failed and refunded payments do not count". Failed payments never produce a paid invoice so they're correctly excluded, but refunded invoices keep their `paid` status in Stripe — the code does not detect refunds. Replace with an accurate description of the `status=paid` filter and note the refund caveat.
The Structure block in the README was missing the file that actually talks to Stripe, leaving the lapsing subsystem's description of "fetches payment history" with no entry pointing at the fetcher.
LapsingOverride.php returns the incoming decision unchanged if the context's `provider` is anything other than 'stripe'. The README described only the Stripe path and did not record that non-Stripe providers fall through untouched — worth making explicit so readers don't assume the override applies universally.
The hook table said the filter only injects `$data["branch"]`, but BranchAssignment.php also writes `$data["customFields"]["branch"]` and ensures a `$data["customFieldsConfig"]` entry for branch. The join-gmtu.php docblock already described both writes; the README table was the only place the full behaviour was understated.
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
Sweeps the README for stale or inaccurate claims about the Stripe lapsing subsystem — most of which pre-date the move off Action Network — and tightens a few other documentation gaps. Split into one atomic commit per discrete correction.
ab55c86) — replaced the stale `id = "join-gmtu"` charge-metadata story with the actual mechanism: match subscription line-item product IDs against configured membership plans read from the `ck_join_flow_membership_plan_*` `wp_options` rows.Test plan
Notes
Branch is based on `main`, independent of PR #9 (`fix/zetkin-branch-assignment-invalid-parameter`). When PR #9 merges, the hook-table row 3 wording here will need a follow-up tweak (the `customFields` writes will no longer happen), but the two PRs touch different lines so no textual conflict is expected.