Can you provide a snippet to make location optional on vendor form update. Thank you.
Please try this PHP snippet
add_filter(
'hivepress/v1/models/vendor/attributes',
function ($attributes){
if(isset($attributes['location'])){
$attributes['location']['edit_field']['required'] = false;
}
return $attributes;
},
1000
);
1 Like
Thank you sir.
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.