Support » Plugin: Import and export users and customers » Notice: Undefined index with hook user_register and custom fields

  • Resolved boon4376

    (@boon4376)


    I am using a custom hook add_action( 'user_register', '_new_user_actions', 10000, 1 ); to run some actions on user fields immediately after account creation.

    I am having a problem where values for advanced custom fields I add are not available when this action fires.

    Is there a hook I can use to ensure I am firing only AFTER the import process is complete?

    My function works fine on normal account creation. Just not with this import plugin.

    Thanks!

    Errors:

    
    Notice: Undefined index: account_company in /home/482918.cloudwaysapps.com/jxfggabfdh/public_html/wp-content/themes/526event/functions.php on line 251
    
    Notice: Trying to access array offset on value of type null in /home/482918.cloudwaysapps.com/jxfggabfdh/public_html/wp-content/themes/526event/functions.php on line 251
    
    
Viewing 1 replies (of 1 total)
  • Plugin Author Javier Carazo

    (@carazo)

    Good morning,

    You can use this hook better:
    do_action( 'post_acui_import_single_user', $headers, $data, $user_id, $role );

    If you have any doubt using it tell me.

Viewing 1 replies (of 1 total)
  • The topic ‘Notice: Undefined index with hook user_register and custom fields’ is closed to new replies.