Would you like to add the ACF field to the add or edit product form, Dokan order, or vendor registration forms? You are at the proper location. I swear you won’t have to perform any coding. If you require dokan add custom fields to product form then this plugin does wonders for the vendors.
We have an important announcement regarding the ACF for Dokan plugin. In the month of July 2024, we have removed ACF for Dokan from the WordPress.org plugin repository. You can learn more about the reason and future plan here.
With the latest release of ACF For Dokan PRO 2.0, there is no need of the FREE version plugin to keep it active.
Admins can easily create custom fields for vendors in the vendor registration form. While creating a custom field using Advance Custom Field, the admin needs to select ‘Vendor Edits Allowed’ so that field is visible in the registration form.
The admin needs to select User Role equal to Vendor in the custom field location rules to make this setting work. After vendor login, they can update the custom fields from the edit account page. The supported field types of ACF are text, textarea, number, URL, select, email, checkbox, radio, file.
Now, the field is created for a vendor. You can use the below ACF functions to display the value:
the_field ( ‘field_name’, ‘user_1’ ); // where 1 indicates user ID
echo get_field ( ‘field_name’, ‘user_1’ ); // where 1 indicates user ID
When the admin creates custom fields from the ACF plugin for the Order post type, the Vendor will be also able to add/update values for orders from their dashboard.
You can use ACF functions like the_field, get_field to display the custom field value of the vendor.
You can display its value using these functions:
the_field(‘text_field’, 123); // where 123 is the order id
echo get_field( “text_field”, 123 ); // where 123 is the order id
Now, you can setup the custom field editable with the Dokan Setup Wizard. There will be a new setting field called Allowed in Setup Wizard? if you enable Vendor Edits Allowed. This way if you want dokan add custom fields to product then this plugin will be handy for all your needs.
If the field Allowed in Setup Wizard is enabled, the vendor will see the custom field in the setup wizard.
The plugin will work with ACF and Dokan free as well as PRO versions.
How to Display Custom Fields of products
Display Custom Fields for User Profiles
Hide or show custom field on selction of category in Dashboard
How to add a new field on product upload form of Dokan?
Adding extra field on the vendor registration form in Dokan
How to make plugins like WooCommerce Product View in AR compatible with Dokan