I’m currently working on setting up my platform using HivePress, and I have a specific requirement that I hope to get some guidance on.
I need to add two additional attachment fields to the “Payout” request form for advertisers when they wish to withdraw their earnings from the platform. These fields are crucial for my payment process as I use Stripe instead of PayPal. Here are the fields I’d like to add:
Identity Card (Front and Back)
Bank Account Details (often referred to as RIB in French)
Having these two pieces of information is paramount for me to ensure a smooth and secure payment process for my advertisers.
Could you please guide me on how to implement these additional fields or if there’s a feature in the pipeline that might cater to this need?
Thank you in advance for your assistance and guidance.
Thank you for your response. I’ve reviewed the code you provided from the topic “Add new payout fields.” However, it seems that the code you shared doesn’t include the attachment fields, which is what I’m specifically looking for.
I’ve previously tried the following code to add attachment fields for an identity card and a bank document (RIB):
add_filter(
'hivepress/v1/forms/payout_request',
function( $form ) {
// Field for the Identity Card (Front and Back)
$form['fields']['identity_card'] = [
'label' => 'Identity Card (Front & Back)',
'type' => 'attachment',
'_order' => '10',
'required' => true,
];
// Field for the RIB
$form['fields']['rib'] = [
'label' => 'RIB',
'type' => 'attachment',
'_order' => '11',
'required' => true,
];
return $form;
},
1000
);
However, after implementing this code with the Code Snippets plugin, I haven’t observed any changes on the platform. Could you please guide me on how to properly add attachment fields to the payout request form? I’d appreciate any assistance you can provide.
Please note, there’s no simple code snippet for adding, validating, saving and displaying custom payout fields in the current version, please consider using vendor attributes - users will have to set them once, and they will not be added to the Add Listings form (they will be in the Complete Profile form, and it appears only if some fields are still not set for a vendor).
Yes, in your case, this tab is called Annonceurs (because you have the French language in the admin panel), and by opening any vendor who has already uploaded a file, you will be able to find the file they added.
There are no files in the ‘Vendors’ section because I am unable to upload a file directly from my profile completion form. When I try to upload a file, I can select a file from my computer, but once I’ve ‘opened’ it, there is no visual confirmation indicating that my file upload has been successfully processed. Moreover, when I try to validate my form by pressing the ‘Save my informations’ button, the error message I set for when no file is uploaded appears; ‘Please upload your RIB.’
I recommend you remove this PHP snippet and add this attribute using vendor attributes, please check this doc: How to add vendor profile fields - HivePress Help Center. Then everything should work and load correctly. If the standard attachment attribute doesn’t work for you, then let me know and we’ll try to help with a PHP snippet.