Meta keys
-
Hello,
I am working on the Seller Registration Form. Where are the meta_key values on this form stored? How can I learn meta keys?
For example, as you know,
meta key first_name for nameFor example, the IBAN I’m looking for?
-
Hi @loopforever
The data that is not the default user data of WordPress user data that are in the
wp_userstable is stored in thewp_usermetatable.If you want to know about various meta_key of the information that is stored as vendor data then you can look for rows with user_id equal to any vendor you want and see all the meta_keys as you can see from this screenshot.
I hope this will help to get to know about all the meta_keys that are used to store vendor data.
Thank you.
There is one point I don’t understand about this. I would be glad if you help. I’m a little confused.
I am using a plugin for Vendor registration form: https://ww.wp.xz.cn/plugins/easy-registration-forms/I found the table you mentioned:
wp_usermeta
The data I want to add to the registration form is kept in an array.
meta_key: dokan_profile_settingsTherefore, a separate meta_key is not created. The data were serialized and saved by Dokan.
Now, I have created a TextField named iban in this form. Vendor will write the iban here.
The plugin I use has a meta_key field. What should I write here? With this form, for example, how can I get the “iban” in dokan_profile_settings?
For example, I use this for Last Name: ImageBecause there is a meta key named last_name.
-
This reply was modified 4 years, 8 months ago by
loopforever.
-
This reply was modified 4 years, 8 months ago by
loopforever.
-
This reply was modified 4 years, 8 months ago by
loopforever.
Updating:
I wanted to update the thread as I’ve progressed. Actually, all I need is the store name.
If I can get the store name in the new form I created, I’ll get everything else with the new form. But what can it do for the store name?wp-content/plugins/dokan-lite/includes/Admin/UserProfile.php
The lack of a hook (filter) for $store_settings is missing here.Hi @loopforever
To save a meta_key in the usermeta of a user, you can use
update_usermeta()function to add a meta_key in the wpPusermeta table. After that, you can useget_user_meta()this function to get the value of the metadata.Thank you for your answer.
But I think you didn’t fully understand me. Yes, I am already doing what you said.
I’ve created a new seller form with a form plugin. Using this form I get the Store Name and store it in the database under a meta key. So far, no problem. But how can I make it compatible with Dokan?
For example wp-admin>User >(Any vendor) Edit section,
Store Name:
I want to see this part. I hope you understand.
I replaced the array value$dokan_settings['store_name']with new values (which I got from the form) with a hook calleddokan_new_seller_created. However, it still didn’t work.Hi @loopforever
You have followed the right way. But if it still does not work then there may be some issue with the code you have written from your side. One last way is to update
dokan_profile_settingsthis meta key’s value and update it.This is what I can recommend from my side.
Hi @loopforever,
We haven’t heard back from you in a while, so I’m going to mark this as resolved – if you have any further questions, you can start a new thread.
Thank you!
-
This reply was modified 4 years, 8 months ago by
The topic ‘Meta keys’ is closed to new replies.