=== Paid Memberships Pro - Email Confirmation Add On ===

Contributors: strangerstudios, messica
Tags: pmpro, paid memberships pro, email, confirmation, validate, validation, confirm, customize, member, membership, subscription, addon
Requires at least: 3.5
Tested up to: 7.1
Stable tag: 1.0.2


== Description ==
Addon for Paid Memberships Pro that will include a validation link in the confirmation email sent to users signing up for certain levels on your site. They will still be members, but the pmpro_has_membership_access_filter will return false until they validate their email or an admin validates for them through the dashboard.

== Installation ==
1. Upload the `pmpro-email-confirmation` directory to the `/wp-content/plugins/` directory of your site.
2. Activate the plugin through the 'Plugins' menu in WordPress.
3. Edit your Paid Memberships Pro levels and check the "require email validation for this level" checkbox.

== Frequently Asked Questions ==

= I found a bug in the plugin. =

Please post it in the GitHub issue tracker here: https://github.com/strangerstudios/pmpro-email-confirmation/issues

= I need help installing, configuring, or customizing the plugin. =

Please visit our premium support site at https://www.paidmembershipspro.com for more documentation and our support forums.

== Changelog ==
= 1.0.2 - 2026-10-07 =
* BUG FIX: Fixed an issue where email confirmation links could fail to validate if another plugin filters `random_password`. #67 (@dparker1005)

= 1.0.1 - 2026-09-30 =
* SECURITY: Email confirmation keys are now randomly generated instead of derived from the user ID and signup time. #66 (@dparker1005)
* SECURITY: Improved sanitization and escaping throughout the plugin to resolve Plugin Check security findings. #65 (@dparker1005)
* BUG FIX: Fixed an undefined index notice on the edit level page when no level ID is present. #65 (@dparker1005)

= 1.0 - 2026-09-15 =
* SECURITY: The email confirmation key is now compared with a timing-safe check and the user ID is validated before use. Resending a confirmation email from the account page now requires a logged in user and a valid nonce. #62 (@flintfromthebasement)
* FEATURE: Added an "Email Confirmation" panel to the Edit Member screen on PMPro 3.0+ showing the member's confirmation status, email address, and which of their levels require confirmation, with actions to validate the member, resend the confirmation email, require re-confirmation, or send a first confirmation email. #61 (@flintfromthebasement)
* FEATURE: Added an "Email Confirmed" column to the Members List and the Users list. The column can be hidden from Screen Options. #61 (@flintfromthebasement)
* ENHANCEMENT: The resend confirmation email is now registered as a PMPro email template class on PMPro 3.4+, so it has a name, description, and variable list on the Email Templates settings page, supports the test email button on PMPro 3.5+, and uses liquid syntax on PMPro 3.7+. Existing customizations to the template are preserved. #64 (@dparker1005)
* ENHANCEMENT: Validating a member from the Edit Member screen now fires the `pmproec_after_validate_user` action, matching validation through the confirmation link. #61 (@dparker1005)
* ENHANCEMENT: The validate and resend row actions on the Users list and Members List now only appear for members whose levels require confirmation, and the "Validated" label is now translatable. #61 (@flintfromthebasement)
* BUG FIX: Fixed PHP warnings when `$pmpro_pages` was not yet populated, such as during REST or AJAX requests. #63 (@dwanjuki)
* BUG FIX: Corrected the error message shown when validating a user who could not be found. #61 (@flintfromthebasement)

= 0.9 - 2026-05-05 =
* ENHANCEMENT: Added a link to the Email Confirmation Add On documentation on the Edit Membership Level page and removed colons from the field labels. #59 (@kimcoleman)
* DEPRECATED: Removed bundled translation files to reduce the shipped plugin package size.

= 0.8 - 2024-07-18 =
* ENHANCEMENT: Updated the frontend UI for compatibility with PMPro v3.1. #53 (@dparker1005, @kimcoleman)

= 0.7 - 2023-08-21 =
* ENHANCEMENT: Improved integration with BuddyPress directories when using the PMPro BuddyPress Add On. #46 (@JarrydLong)
* ENHANCEMENT: Updating `<h3>` tags to `<h2>` tags for better accessibility. #51 (@michaelbeil)
* BUG FIX/ENHANCEMENT: Now allowing users without a confirmed email address to cancel their membership. #45 (@dparker1005)
* BUG FIX/ENHANCEMENT: Improved compatibility with PMPro Multiple Memberships Per User Add On. #47 (@dparker1005)
* REFACTOR: No longer pulling checkout level from `$_REQUEST` variable. #49 (@dparker1005)
* REFACTOR: Now using the function `get_option()` instead of `pmpro_getOption()`. #50 (@dwanjuki)

= 0.6 - 2020-09-10 =
* SECURITY: Escaped text on front-end.
* BUG FIX: Fixed issue where manually added members were validated but treated as unvalidated members on the front-end.
* BUG FIX: Fixed grammar (spacing) issue for the email confirmation message. 
* ENHANCEMENT: Added localization functionality, includes Afrikaans and English (UK) translations
* ENHANCEMENT: Added new filters to handle validation redirects for logged-in and logged-out users: `pmproec_logged_in_validate_redirect` and `pmproec_logged_out_validate_redirect` respectively.
* ENHANCEMENT: Added 'Resend Confirmation Email' to the Membership Account page.

= .5 - 2018-09-13 =
* ENHANCEMENT: Added filter pmproec_extra_query_args to allow developers to add extra query args to the email confirmation link.
* ENHANCEMENT: Option added to revalidate user's if they change their email address - if an admin changes a user email user's won't need to validate their email again.
* ENHANCEMENT: Admins and users are able to resend the email confirmation at any point while the user's email is not validated.
* ENHANCEMENT: Resend email confirmation link added to the user's membership account page.
* ENHANCEMENT: Custom HTML email template for resending email confirmation requests.
* ENHANCEMENT: Integrates with Email Templates Admin Editor and uses !!validation_link!! shortcode available in the resend confirmation email template.
* ENHANCEMENT: Adjusted the method used to generate validation keys.
* BUG FIX: Removed PHP Notice error log entry.
* ENHANCEMENT: Support localization, includes master POT file.

= .4 =
* ENHANCEMENT: Now also filtering pmpro_has_membership_level to users who aren't confirmed won't see content hidden via shortcodes or pmpro_hasMembershipLevel().

= .3 =
* If you have !!validation_link!! in your email body, the validation link will be inserted there instead of at the top of the email. (Thanks, Thomas Sjolshagen)

= .2.2 =
* Added pmproec_after_validate_user hook to execute custom code after validation.

= .2.1 =
* Fixed typo in text added to email. (Thanks, Jiks)
* BUG: Fixed login URL destination when users are logged out

= .2 =
* Added a checkbox to the edit level page to check if a level should require email confirmation.
* Added a "Validate User" link to the user admin to force validate a user.

= .1 =
* This is the initial version of the plugin.

