Simple Membership Plugin › Forums › Simple Membership Plugin › Customizing the login limit message
Tagged: customizing expiry date
- This topic has 7 replies, 2 voices, and was last updated 2 months ago by
cowiz.
-
AuthorPosts
-
September 11, 2026 at 7:25 am #32299
cowiz
ParticipantHi, please i wish to know how i can customize the login limit message that appears when the user tries to connect to his account when he has exceeded the maximum active connections message. here is what the current message looks like:
Login Sessioin Expired
You have been locked out because the maximum active login limit for this account has been reached.If this was an error, you can go to the login page and try lohging in again.September 11, 2026 at 7:35 am #32302admin
KeymasterThat message is shown on a browser or device that was logged out after the same account logged in elsewhere. The text is translatable, so you can change it using this technique:
https://simple-membership-plugin.com/customize-text-and-messages-using-the-translation-file/September 16, 2026 at 7:38 pm #32325cowiz
Participantplease i also wish to know how i can make the account expiration date to include the time. For example instead of the account expiration appearing as September 28, 2026 i want it to appear as September 27, 11:59pm, 2026
September 17, 2026 at 5:48 am #32327admin
KeymasterThe account expiry value is stored and calculated as a date only, so there is no time value attached to it that the plugin can display. The date is formatted using your WordPress date format setting (Settings > General), which is why adding a time to that format would only ever show 12:00 am.
That said, what you want to display is accurate. Internally the membership is treated as expired from the start of the expiry date, so an expiry of September 28, 2026 means the member’s access ends at the end of September 27. If you want the account page to say it that way, you can override the template that renders it.
Copy the plugin’s views/loggedin.php file to your theme in the following location:
/wp-content/themes/your-child-theme/simple-membership/loggedin.phpThen in your copy, replace the line that outputs $auth->get_expire_date(); with something like this:
$member_id = SwpmMemberUtils::get_logged_in_members_id(); $expiry_ts = SwpmMemberUtils::get_expiry_date_timestamp_by_user_id( $member_id ); if ( $expiry_ts == PHP_INT_MAX ) { echo __( 'No Expiry', 'simple-membership' ); } else { echo date_i18n( 'F j, Y', $expiry_ts - DAY_IN_SECONDS ) . ', 11:59 pm'; }Adjust the date format string to suit. The template override is upgrade safe, so your customization will survive plugin updates. Note that this only changes the member account page. The expiry date shown in the admin member records and in email merge tags will still use the standard date.
Template customization documentation:
https://simple-membership-plugin.com/how-to-override-simple-membership-plugin-templates-in-your-theme/September 17, 2026 at 6:51 pm #32328cowiz
ParticipantCan i also change it in the admin member records and email merge tags?
September 19, 2026 at 5:24 am #32335cowiz
Participant?
September 19, 2026 at 5:54 am #32337admin
KeymasterNo, that’s not possible with our plugin unfortunately.
September 19, 2026 at 6:25 am #32338cowiz
ParticipantUnderstood.Thank you!
-
AuthorPosts
- You must be logged in to reply to this topic.