Join our new community forum for support & discussion

Join Now

Home Support Extensions Authentication entry in the value of the user database

entry in the value of the user database

  • Author
  • tovarischnovoseltsev

    Have a good day. Could help me. To this code, you need to add an entry in the value of the user database cell (billing_phone) and at the same time the value in the seller field (hp_telefon)

    	function( $form ) {
    		$form['fields']['billing_phone'] = [
    			'label'    => 'Телефон',
    			'type'     => 'text',
    			'required' => true,
    			'_order'   => 100,
    		return $form;

    i added this code but it doesn’t work

    add_action( 'wpmi_usermeta', 'true_register_fields' );
    function true_register_fields( $user_id ) {
    	update_user_meta( $user_id, 'billing_phone', sanitize_text_field( $_POST[ 'billing_phone' ] ) );
    ihor developer

    If possible send more details about this issue, do you mean syncing the vendor attribute value with the user’s meta field automatically?


    Yes, this is exactly the problem.

    ihor developer

    If you’re familiar with customizations please try using this hook You can check if the “billing_phone” meta field is updated for user, and then update the related vendor’s post meta field “hp_telefon”. This way both values will be in sync.


    thanks, I’ll try, this code will need to be inserted using snips, or in some specific file.


    How can a merchant be activated simultaneously with user registration?

    ihor developer

    You can keep PHP snippets using the Code Snippets plugin or add them to the child theme’s functions.php file. If you mean creating a vendor profile for every regular user registration there’s no such feature at the moment (users can register vendor profiles via the /register-vendor URL), this would require customizations.

Viewing 8 posts - 1 through 8 (of 8 total)

New Reply

This forum has been archived and is no longer accepting new posts or replies. Please join our new community forum for support & discussion.