1. Home
  2. WC Vendors Pro
  3. How To
  4. Custom Fields to Vendor Settings Page (Pro)

Custom Fields to Vendor Settings Page (Pro)

This code adds a custom field to the Dashboard > Settings page for your vendors to provide you extra bits of info you may need from them. Duplicate for each custom field you need, renaming the meta keys and functions each time so they are not duplicated.  For WC Vendors Pro, the updates you need to make are in three parts as described below.

Part 1:  Add this code to your theme’s functions.php file:

Part 2: This adds the custom field to the wp-admin > Users > Edit User screen, if you need it to, and also goes in your theme’s functions.php file:

Part 3: In order to show the custom field on your Pro Settings page, you need to add the function you just created above to the template. Copy /plugins/wc-vendors-pro/templates/dashboard/store-settings.php to /themes/yourtheme-child/wc-vendors/dashboard/store-settings.php and add this wherever you want the field to show up (see WCVendors Pro Setup Guide for help on custom templates):

 

actions

Updated on January 8, 2018

Was this article helpful?