Thread Starter
kuphd1
(@kuphd1)
Sorry… this is on the user profile page on the front end. Should’ve included where I’m getting the error.
Thread Starter
kuphd1
(@kuphd1)
Darn… last thing. It’s being used in conjunction with the Theme My Login plugin.
Thread Starter
kuphd1
(@kuphd1)
Okay… maybe not last thing… LOL
It looks like adding a conditional around the code above fixes it. So…
$user->membership_level->enddate = strtotime( get_option( 'timezone_string' ), $user->membership_level->enddate );
… would become…
if($end_date) {
$user->membership_level->enddate = strtotime( get_option( 'timezone_string' ), $user->membership_level->enddate );
}
It seems the error is occurring because the logged in user (in this case, my admin account) doesn’t have a membership attached to it. Thus… no “enddate”. But wrapping that conditional around it solves the issue.
Hey @kuphd1,
Thank you for your feedback, glad you managed to figure it out!
I have added an issue to the github page of Paid Memberships Pro for you with a link to this forum so the Paid Memberships Pro development team may look into this and implement this bug fix.
Thank you once again and happy holidays!
Please would you mark this ticket as resolved when you get a moment. 🙂
Here is the link to the Github issue, please feel free to add to it – https://github.com/strangerstudios/paid-memberships-pro/issues/415
Thread Starter
kuphd1
(@kuphd1)
Hi @andrewza,
Thanks much and happy holidays to you as well. 🙂