Simple Membership Plugin › Forums › Simple Membership Plugin › {reg_link} not showing in the email
Tagged: reg_link email
- This topic has 10 replies, 3 voices, and was last updated 3 years, 9 months ago by
Serge.
-
AuthorPosts
-
August 14, 2022 at 3:10 am #24218
Serge
ParticipantHi there,
After Paypal payment and redirected to the Registration page, I see the proper link in the page.
However, in the registration email I see no link.
Here is the email:
Dear Serge LamarcheThank you for joining us!
Please complete your registration by visiting the following link:
Thank You
I had debug on. So here are the lines that should mention the link:
[2022/08/13 18:52:16] – SUCCESS: Membership payment paid for membership level ID: 6
[2022/08/13 18:52:16] – SUCCESS: Transaction type: web_accept. Creating member account…
[2022/08/13 18:52:17] – SUCCESS: Saving transaction data to the database table.
[2022/08/13 18:52:17] – SUCCESS: Transaction data saved.
[2022/08/13 18:52:17] – SUCCESS: Paypal class finished.Anyone has a clue about this?
thanks,
SergeAugust 15, 2022 at 2:34 am #24220mbrsolution
ModeratorHi Serge, check the email settings to make sure there is no weird entries in the email body. Go to Settings -> Email Settings and check the entries in the Email Body under Email Settings (Prompt to Complete Registration ).
Thank you.
August 15, 2022 at 6:59 am #24226Serge
ParticipantHi mbr,
this is it:
Dear {first_name} {last_name}Thank you for joining us!
Please complete your registration by visiting the following link:
{reg_link}Thank You
{reg_link} is there. I can look in the php files and edit them but can’t find where the issue could be.
thanks,
SergeAugust 15, 2022 at 7:01 am #24227Serge
ParticipantI forgot to mention that first name and last name were showing up normally.
August 15, 2022 at 11:51 pm #24231mbrsolution
ModeratorHi, out of curiosity. Are you also using the Form Builder addon?
Regards.
August 16, 2022 at 5:46 am #24243admin
KeymasterPlease make sure that you didn’t delete your registration page that our plugin needs to function correctly. If the registration page is missing or it has gotten messed up from an edit you may have done to the page, it can cause an unexpected behavior like the one you described.
Check the following page and make sure all those required pages are in place with the correct shortcode in them:
https://simple-membership-plugin.com/recreating-required-pages-simple-membership-plugin/Also, have you edited the plugin’s code in any way? The debug logging information seem to be missing some lines that a normal install of the plugin is supposed to have. So either there is a conflict happening on this site or the plugin’s code may have been modified. If you edited the plugin’s code, it can have some unexpected behaviors. Best to delete the plugin and re-install a fresh un-edited copy of the plugin. You won’t lose any member or other settings data that you already configured in the plugin. So you can delete the plugin and re-add it from the wp.org repository. At least that will ensure that the issue is not arising from a code edit that has gone wrong in some way.
August 16, 2022 at 5:54 pm #24245Serge
Participantmbr: no, form builder addon is not added.
admin: I have changed the registration page for one of mine. The url is different. I did edit the code in the plugin (just to display two more fields) but I want to keep my edits. Instead of reinstalling, I would rather find the source of the issue. Is there a trace I could add in code to find out where the plugin lost it’s track that I could see in debug?thanks,
SergeAugust 17, 2022 at 12:25 am #24246Serge
ParticipantHi there,
maybe another clue. I did a test registration and the confirmation email is missing the email but, again, has the correct username. See:
A new member has completed the registration.Username: Sergetestmember
Email:Please login to the admin dashboard to view details of this user.
Thank You
===========
If I could be pointed to the php file involved in picking the data for email, I could probably find out the bug.thanks,
SergeAugust 17, 2022 at 4:07 am #24248mbrsolution
ModeratorHi,
I have changed the registration page for one of mine. The url is different.
If you make any changes to the default pages including the URL, you must enter the changes described in the following documentation. If not, the registration process will fail.
https://simple-membership-plugin.com/recreating-required-pages-simple-membership-plugin/
I did edit the code in the plugin (just to display two more fields) but I want to keep my edits.
Can you share the changes you made.
Thank you.
August 17, 2022 at 4:30 am #24252Serge
ParticipantHi mbr,
actually I only changed the joinus url and I did update the url in the settings.Note that the registration process still works fine. The only issue id the reg_link not in the email.
I changed a few files to add the field member_number. For example this one that refers to reg_link: class.swpm-utils-misc.php
But all I did was add in line 325:
‘{member_number}’,
and in line 348:
$user_record->member_number,
There are a few other files I edited but nothing more than add this field.
What would help to know is which files inserts reg_link in the email. Btw, reg_link is showing in the page and it can be created with the tool (see tool tab)thanks,
SergeAugust 22, 2022 at 1:33 am #24286Serge
ParticipantHi Admin,
I did reinstall the plugin and it did work properly again. I checked my edits and found out that the order of replaceable tags was the issue. I would like to use the tag {member_number} in emails. Wouldn’t it possible now?
Here are the replaceable tags in class.swpm-utils-misc.php :
//Define the replacable tags
$tags = array(
‘{member_id}’,
‘{user_name}’,
‘{first_name}’,
‘{last_name}’,
‘{membership_level}’,
‘{membership_level_name}’,
‘{account_state}’,
‘{email}’,
‘{phone}’,
‘{member_since}’,
‘{subscription_starts}’,
‘{company_name}’,
‘{password}’,
‘{login_link}’,
‘{reg_link}’,
‘{primary_address}’,
‘{extra_info}’,
‘{notes}’,
‘{member_number}’,
);thanks,
Serge -
AuthorPosts
- You must be logged in to reply to this topic.