Dokan Register Metadata Problem
-
Hello,
I am performing a Vendor Registration with a plugin. I am collecting data as array in a metakey named xyz_vendor. The Vendor needs to be activated after the registration phase. So far everything is perfect.
After the vendor is activated, a row named dokan_profile_settings is created in the usermeta table. As you know here store_name etc. there is a lot of data.The registration plugin I’m using provides me with a hook: user_activated.
Using this hook I want to assign the store_name that I got in the past after the vendor is activated. But after the code runs, all other data in dokan_profile_settings (For example phone) is deleted. How can I prevent this?
Thank you from now. Can you help me ? My code is below.add_action('user_activated', 'new_vendor_activated',10); function new_vendor_activated ($user_id){ $store_name = get_user_meta($user_id, 'xyz_vendor'); $new_store_name = array('store_name'=>$store_name[0]['store_name']); //Update Store Name update_user_meta($user_id, 'dokan_profile_settings',$new_store_name); }2-) I didn’t want to open a topic again. Is there a way to remove the array named [profile_completion] in the dokan_profile_settings meta?
The topic ‘Dokan Register Metadata Problem’ is closed to new replies.