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

Change membership level access does not send an email #108

Open
3 tasks done
michaelbeil opened this issue Jun 29, 2021 · 3 comments
Open
3 tasks done

Change membership level access does not send an email #108

michaelbeil opened this issue Jun 29, 2021 · 3 comments

Comments

@michaelbeil
Copy link

michaelbeil commented Jun 29, 2021

Describe the bug
With MMPU active, when you change the membership level of a member, an email is not sent out. A member saw this as reported in ticket 344696 (moderators only).

To Reproduce
Steps to reproduce the behavior:

  1. Enable MMPU.
  2. Find a test user, and change their Paid Membership access level to anything.
  3. No admin email or user email is sent based on this new access when MMPU is activated.
  4. Disable MMPU and emails will send again.

Expected behavior
I expected the emails to be sent out.

Isolating the problem:

  • I have deactivated other plugins and confirmed this bug occurs when only the Paid Memberships Pro and MMPU plugins are active.
  • This bug happens with a default WordPress theme active, or Memberlite.
  • I can reproduce this bug consistently using the steps above.

WordPress Environment

``` Paid Memberships Pro 2.5.10, MMPU 0.8, Twenty Twenty-One 1.2, WP 5.7.2, and PHP 7.4.1 ```
@michaelbeil
Copy link
Author

michaelbeil commented Jul 20, 2021

A member reported this in ticket 359121 (moderators only).

When using the Multiple Memberships Per User Plugin, and changing a user’s membership level or adding a membership from User Admin panel, notification emails are not being sent to the user. Test emails however from the Member email settings however, do seem to be working.

@ipokkel
Copy link
Member

ipokkel commented Mar 17, 2022

Moderators only: https://www.paidmembershipspro.com/forums/topic/emails-dont-send-when-admin-cancels-membership/

The sendAdminChangeAdminEmail and sendAdminChangeEmail parts of the profile.php are commented out here.

// $subscription_id = -1;
// foreach($old_levels as $checklevel) {
// if($checklevel->id == $leveltodel) {
// $subscription_id = $checklevel->subscription_id;
// break;
// }
// }
// $wpdb->query("UPDATE $wpdb->pmpro_memberships_users SET status ='admin_cancelled', enddate ='".current_time('mysql')."' WHERE id=$subscription_id");
// if(is_array($_REQUEST['cancel_subscription']) && array_key_exists($arraykey, $_REQUEST['cancel_subscription']) && !empty($_REQUEST['cancel_subscription'][$arraykey])) {
// $other_order_ids = $wpdb->get_col("SELECT id FROM $wpdb->pmpro_membership_orders WHERE user_id = '" . $user_id . "' AND status = 'success' AND membership_id = $leveltodel ORDER BY id DESC");
//
// foreach($other_order_ids as $order_id)
// {
// $c_order = new MemberOrder($order_id);
// $c_order->cancel();
// }
// }
// //email to admin
// $pmproemail = new PMProEmail();
// $pmproemail->sendAdminChangeAdminEmail(get_userdata($user_id));
//
// //send email
// if(is_array($_REQUEST['send_admin_change_email']) && array_key_exists($arraykey, $_REQUEST['send_admin_change_email']) && !empty($_REQUEST['send_admin_change_email'][$arraykey])) {
// //email to member
// $pmproemail = new PMProEmail();
// $pmproemail->sendAdminChangeEmail(get_userdata($user_id));
// }

@andrewlimaza
Copy link
Collaborator

I think this gets disabled as the function needs to support MMPU, which it currently doesn't do.

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

3 participants