Create customer from WooCommerce to MailRelay
-
hi
I have done an integration from WooCommerce to MailRelay. In WooCommerce I choose order-create. I select the fields (email and billing first name) and the customer data chosen in these fields is recorded on the MailRelay platform.
Now, on the WooCommerce “account” page, a form appears to register as a customer, with only the email and password fields. From functions.php I create a new field for the customer name:
with the
woocommerce_register_form_start
hook I create a new field:<label for="reg_first_name"><?php _e( 'First name', 'woocommerce' ); ?><span class="required">*</span></label>
<input type="text" class="input-text" name="first_name" id="reg_first_name" value="<?php if ( ! empty( $_POST['first_name'] ) ) esc_attr_e( $_POST[' first_name'] ) ?>" />I register and validate the field with the
woocommerce_register_post
hook and save it using thewoocommerce_created_customer
hook.It should be said that all of this, at the level of WordPress and WooCommerce, the code works correctly. The
first_name
is saved in both WordPress and WooCommerce.In Bit Integrations, I want to do an integration from customer-create to MailRelay. In the fields section, I match email (form fields) with email (mailrelay fields), and first name (form fields) with name (mailrelay fields).
On the MailRelay platform, only the email field appears registered. The name field is not recorded. Remains empty.
How can I correct this?Many thanks
- You must be logged in to reply to this topic.