strangerstudios / paid-memberships-pro

WordPress membership plugin to restrict access to content and charge recurring subscriptions using Stripe, PayPal, and more. Fully open source. 100% GPL.
https://www.paidmembershipspro.com
Other
457 stars 357 forks source link

Not all custom user fields are emailed to admins #2269

Open rweaver-core opened 1 year ago

rweaver-core commented 1 year ago

Prerequisites

Steps to reproduce the issue

  1. Create a new user field(new group or existing) with "Show fields on user profile" selected as anything other than "Yes"
  2. Create a new user field(new group or existing) with "Show fields on user profile" selected as "Yes"
  3. Register as new user
  4. Email sent to admin will NOT include user field that is not selected as "Yes"

Expected/actual behavior

When I follow those steps, I see... the field and value are missing from the admin email.

I was expecting to see...the field and value in the admin email

Isolating the problem

WordPress Environment

Wordpress v 6.0.3 Paid Memberships Pro v 2.9.5 PHP v 7.4.27

Please share non-sensitive information about your hosting environment such as WordPress version, PHP version, Paid Memberships Pro and any related plugins versions.

andrewlimaza commented 1 year ago

Thanks for letting us know about this @rweaver-core, looking into the code it does only add these fields automatically when they are visible to the user's profile.

A temporary solution would be to add all the field names to your email template via the template editor. Such as !!user_field_name!! which should force it to be added regardless of the field profile setting.