Quantity and purchase note required

  1. I tried snippet but it’s not working, please make quantity and purchase note required not optional in add listing form.

  2. Is that possible to change name of price field to something ales? i tried loco translate but price field name change in request forms and marketplace form, i just want to change price field name only on listing form for marketplace only.

Hi,

Regarding quantity, please use this PHP snippet:

add_filter(
	'hivepress/v1/models/listing/attributes',
	function( $attributes ) {
		if ( isset( $attributes['quantity'] ) ) {
			$attributes['quantity']['edit_field']['required'] = true;
		}

		return $attributes;
	},
	1000
);

As for the purchase note, please use this PHP snippet - Make the purchase note or booking note required #hivepress #marketplace #bookings · GitHub

​I hope this is helpful to you.

Thank you for the solution.

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