Hi,
The following code snippet will retrieve the expiry date of the member who is logged into the site and viewing the page:
<?php
if(SwpmMemberUtils::is_member_logged_in()) {
$auth = SwpmAuth::get_instance();
$expiry_date = $auth->get_expire_date();
echo "Expiry date: ".$expiry_date;
}
else{
echo "You are not logged-in as a member";
}
?>
Kind regards.
Thread Starter
Biyans
(@biyanpasau)
I think I didn’t explain my question very detail. What I’m trying to do is to show certain content only for expired member. For example:
<?php if account_is_expired() {
echo 'Only expired account can see this text';
} else {
echo 'Text only for active member';
} ?>
How do i do that on this plugin?
Thank you for providing more information. I think the following addon is what you are looking for. It has a shortcode for expired members.
https://simple-membership-plugin.com/apply-partial-section-protection/
Let me know if this works for you.
Kind regards.
Thread Starter
Biyans
(@biyanpasau)
Exactly what I need. Thank you!