please i facing a challenge with this snippet code , the code was working perfectly and suddenly stop
add_filter(
'hivepress/v1/forms/listing_update/errors',
function( $errors, $form ) {
$listing = $form->get_model();
if ( $listing && ! $listing->get_image__id() ) {
$errors[] = 'Please upload at least one image.';
}
return $errors;
},
100,
2
);
add_filter(
'hivepress/v1/forms/listing_update',
function( $form ) {
$form['fields']['images']['statuses']['optional'] = null;
return $form;
},
1000
);