I have been able to find a way to add a custom field to a Woocommerce Product Vendor's "Edit Vendor" screen, that the Admin (me) can edit - using the following code. But, the vendor has NO access to this same custom field, and the custom field doesn't show up in their public profile.
To clarify, my goal is to add a custom field to a Woocommerce Product Vendor's public profile that can be edited by the vendor.
Thanks!
add_action('wcpv_product_vendors_edit_form_fields', 'edit_vendor_custom_fields', 10);
function edit_vendor_custom_fields($term) {
$vendor_data = get_term_meta( $term->term_id, 'vendor_data', true );
$custom_field = isset( $vendor_data['custom_field'] ) ? $vendor_data['custom_field'] : '';
?>
<tr class="form-field">
<th scope="row" valign="top"><label for="custom_field">test</label></th>
<td>
<input type="text" name="vendor_data[custom_field]" id="custom_field" value="<?php echo esc_attr($custom_field); ?>" />
</td>
</tr>
<?php
}