Okay
  Public Ticket #3708718
Customize emails with registration fields
Closed

Comments

  • Jon started the conversation

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

    I don't see anything in your documentation

  •  2,212
    WebWizards replied

    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