When vendors apply for sales proceeds to be transferred, they can also specify a decimal point.
Can I prevent them from specifying numbers after the decimal point?
Hi,
Please try this PHP snippet (How to add custom code snippets - HivePress Help Center):
add_filter(
'hivepress/v1/forms/payout_request',
function( $form ) {
if ( isset( $form['fields']['amount'] ) ) {
$form['fields']['amount']['type'] = 'number';
$form['fields']['amount']['decimals'] = 0;
$form['fields']['amount']['min_value'] = 0;
}
return $form;
},
1000
);
Please note that you may require additional customizations in the future.
1 Like
Thank you for your help!
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.