WP User Frontend was firstly made for creating posts and pages from frontend. But now it is really big enough and highly customizable. One of the great feature of WPUF is, it enables you to pass data to other tables in your database and plugins.
So in this tutorial I will show you How to make a WordPress plugin frontend compatible and use meta_keys to integrate other plugins with WPUF, so that you can take inputs from frontend to work with your plugin.
1. Make a post from your plugin
Most of the plugins, like – WooCommerce or any event management plugin creates custom post type and takes data through posts. A regular post has two mandatory field – TItle and Content. But custom post types might have some extra custom fields to get some more details like price, product type or date and time filed etc.
And these custom fields work via meta_keys. If you are not familiar with the term meta_key then you may want to read this doc http://codex.wordpress.org/Custom_Fields
This is the parent doc and you will see two main functions in the Function Reference section and can read further about them.
2. Install Post Meta Inspector
This is a must have plugin for WordPress developers. We use it everyday to inspect what are the custom fields inside a custom post and what type of data is being saved through them.
Download and install this plugin from here https://wordpress.org/plugins/post-meta-inspector/
3. Open the post
Now get back to the custom post which you created earlier and scroll to the bottom. You will get to see something like this
I have taken above screenshot from WooCommerce product. So now we know what meta keys does a product have and which one I will need to enter with WPUF form.
It is not mandatory that we have to use all the meta_keys present in a post or available in the plugin; we may use the keys we only need to use.
4. Make a form
This is the most important part of this tutorial. You have to copy paste the meta keys in to the custom fields of WPUF. There is almost every kind of possible field available in WPUF. So you can choose the type you want. Most of us feel comfortable with the text field and it can take every kind of data.
See, in the above image, I have placed a key named company_name into meta key field. So the data inserted into that field, corresponds to the post_meta table and company_name column and other plugins can easily find, use and update this data.
Now you just have to publish the form and test. If you have done everything right, then you can use any kind of plugin you want. Let us know in our support forum, if you have any confusion.