how to make compulsory required to add file on add file option when vendor deliver the product . i want file and note to be added requied for all vendor . how i can achieve that please tell . as vendor is not delivering product .
Hi,
Please try the snippet below:
add_filter(
'hivepress/v1/forms/order_deliver',
function( $form ) {
if ( isset( $form['fields']['note'] ) ) {
$form['fields']['note']['required'] = true;
}
if ( isset( $form['fields']['attachment'] ) ) {
$form['fields']['attachment']['required'] = true;
}
return $form;
},
1000
);
Hope this helps
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
