Hello! I would like to limit the quantity field on marketplaces listings to only two options - 6 or 12.
Or accept only values between 6-12. Is this something that is possible? Thank you.
Yes, if this limit is the same for all listings it may be possible with a simple code snippet, let me know if this works for you.
That would be perfect, thank you.
Hi,
Please try this PHP snippet:
add_filter(
'hivepress/v1/forms/listing_update',
function($form){
if(isset($form['fields']['quantity'])){
$form['fields']['quantity']['min_value'] = 6;
$form['fields']['quantity']['max_value'] = 12;
}
return $form;
},
1000
);
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.