Public Ticket #3708718

Customize emails with registration fields

Closed
Comments
6 Tickets
Jon started the conversation 2 years ago on August 21, 2024 at 1:34am

Does your plugin allow developers to access custom registration fields in the email templates?

I don't see anything in your documentation

2,762
KingsPlugins replied 2 years ago on August 21, 2024 at 9:23am

Hi Jon,

It is possible to do that if you customize the .php email templates. 


The way this would work is that each B2BKing registration field has a name such as "b2bking_custom_field_123" where 123 is the post ID of the field. (You can usually just inspect the field via right click -> inspect and see its name).

Then in the .php email template you can use $_POST['b2bking_custom_field_123'] which will contain the value of the field. This would work for the welcome email template that is sent customers after registration.


If you want to access that information later (not just during the registration process), it is also possible by using $value = get_user_meta ($user_id, 'b2bking_custom_field_123', true);

Let me know if I can help with anything, or if you have any questions,

Kind regards,

Stefan

Sign In