Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Email Changes in WordPress Are Not Synced to Stripe (Causes Renewal Issues) #3312

Open
Inveniari opened this issue Feb 22, 2025 · 0 comments

Comments

@Inveniari
Copy link

Issue Description:
When a member’s email address is changed in WordPress (via profile update), the new email is not updated in Stripe. This causes issues with recurring payments because Stripe continues using the old email for invoices, payment reminders, and subscription management.

This issue is especially critical for:

  • Membership renewals: If the email in Stripe is incorrect, members may miss renewal reminders.
  • Payment receipts: Members will receive Stripe invoices at an outdated email address.
  • Admin confusion: There’s no indication in PMPro that emails are not being synced.

Steps to Reproduce:

  • Register a user in PMPro with a Stripe subscription.
  • Change the user’s email in WordPress (Users > Edit User).
  • Check the customer profile in Stripe—the email remains unchanged.
  • The next renewal invoice will still be sent to the old email address.

Expected Behavior:
When a user's email is changed in WordPress, PMPro should automatically update the email in Stripe for the associated customer. This ensures that renewal invoices, receipts, and notifications go to the correct address.

Actual Behavior:

  • PMPro does not update Stripe when an email is changed.
  • Admins are not warned that Stripe is still using the old email.
  • Future renewals and invoices go to the outdated email.

Possible Solutions:
Sync Email Updates Automatically

  • When a user’s email is updated in WordPress, trigger an update in Stripe.
  • Use Stripe\Customer::update($customer_id, ['email' => $new_email]).
  • Display a Warning in Admin Panel

If PMPro cannot update Stripe automatically, show a notice when an email is changed:
“This user’s email has changed. Please update their email in Stripe to ensure proper renewal processing.”

Provide a Manual Sync Option

  • A button in PMPro settings to sync all emails with Stripe.
  • A bulk update tool for admins to review and update mismatched emails.

Consider Handling Existing Email Conflicts (⚠️ Important for Recurring Payments)

  • If a user’s new email is already associated with another Stripe customer, Stripe may reject the update or cause issues with renewals.
  • PMPro should check for email conflicts before updating Stripe and notify admins when manual review is needed.
  • This prevents payment orphaning (where renewals go to an old email) or duplicate Stripe accounts for the same user.

Additional Context:
This issue was discovered when a user paid for a membership but did not receive renewal reminders. The payment was recorded in Stripe, but PMPro had no way of knowing the email was outdated. The issue only became apparent after an accidental discovery, meaning other users may be affected without realizing it.

Note:
This issue was analyzed systematically with the help of ChatGPT to ensure clarity and completeness.

Request:
Can this be added to a future PMPro release?

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

No branches or pull requests

2 participants