Hey I want to disable the budget field on Request and make the budget $20 for everyone.
Here’s what I did to start with
//Disable the budget field in the request
add_filter(
'hivepress/v1/models/request/attributes',
function( $attributes ) {
if ( isset( $attributes['budget'] ) ) {
$attributes['budget']['edit_field']['value'] = 20;
$attributes['budget']['display_format'] = '';
//Make the budet field invisible on the send request form.
$attributes['budget']['editable'] = false;
$attributes['budget']['filterable'] = false;
$attributes['budget']['edit_field']['required'] = false;
}
return $attributes;
},
1000
);
I’ve made the budget field disappear and made the value 20. However, I need to press the update button on each request in order to make this value updated.
Is there anyway where budget gets updated autmatically?