Home Support Extensions Marketplace Pricing is required field – why?

Pricing is required field – why?

  • Author
    Posts
  • GoParkPlay

    After installing this extension it is requiring us to put in a price for our listings. This is a bit awkward as some of our listings are free places like a Park or a Playgrounds. Is there a way to disable this?

    serhii developer

    Please try using this PHP code snippet

    add_filter(
    	'hivepress/v1/models/listing/attributes',
    	function( $attributes ) {
    		if ( isset( $attributes['price'] ) ) {
    			$attributes['price']['edit_field']['required'] = false;
    		}
     
    		return $attributes;
    	},
    	1000
    );
Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.