Make the 'Amount' field in the payment request pop-up non-editable

Hello everyone,
Is it possible to make the “Amount” field non-editable? This way, we can avoid having to check if the requested amount is correct every time. Attached screenshot.

Thank you

Hi,

Please note that you can specify the minimum payout amount in HivePress > Settings > Payouts. Also, a vendor will not be able to make a payout for an amount that exceeds their balance.

​I hope this is helpful to you.

perhaps I didn’t explain myself well, I would like the field not to be editable because if for example I as a seller want to request a payment of 100 instead of 80 I can do so, I saw that the field auto-fills with the correct amount but is editable.

Please try this PHP code snippet

add_filter(
	'hivepress/v1/forms/payout_request',
	function($args){
		
		if(isset($args['fields']['amount'])){
			$args['fields']['amount']['attributes']['readonly'] = true;	
		}
		
		return $args;
	},
	1000
);

it’s exactly what I wanted! thank you very much it works!

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.