Hi @loopforever
There is a hook that is triggered at the time of the creation of a vendor account. dokan_new_seller_created this is the action hook I am referring to.
Besides, when a vendor registers and logs in for the first time, s/he is redirected to the seller setup wizard using woocommerce_registration_redirect hook. You can have a look at wp-content\plugins\dokan-lite\includes\Vendor\SetupWizard.php this file that may help.
Thanks!
The problem is:
I tried these hooks and they didn’t work.
I am creating a Vendor Register with register form. I keep the data in a usermeta.
The seller is not active after registration. The plugin offers a hook after activation: knd_user_activated.
Using this I wrote a code to identify the store name after the seller activated it. However, this did not work.
add_action('knd_user_activated', 'user_actived_after_register', 10);
function user_actived_after_register($user_id){
$get_data = get_user_meta($user_id, 'vendor_new_form',true);
$create_store_name_data = array('store_name'=>$get_store_name['store_name']);
update_user_meta( $user_id, 'dokan_profile_settings',$create_store_name_data);
}
}
I tried the hooks you mentioned in the 2nd. However, it still fails. For example, this code is defined below and it still doesn’t work. I activate the seller. But the store name always comes up blank. I have store name from database. There is never a problem here.
I haven’t been able to solve this problem for 1, 1.5 weeks. I would be very happy if you guide me.
add_action('dokan_new_seller_created', 'user_actived_after_register', 10,2);
function user_actived_after_register($user_id, $dokan_settings){
$get_data = get_user_meta($user_id, 'vendor_new_form',true);
$dokan_settings['store_name'] = $get_store_name['store_name'];
}
}
Hi @loopforever
Thanks for your effort, but under our support policy, we are unable to review any custom code.
Regards,