Location change approval

Hello,
I have built taxi listing website, so listing owner change the location based on current location of taxi, so each time i have to manually approve the changes, i want to allow listing owner to change location without approval.

Change Location without moderation.

Hi,

Please try to use this PHP snippet (How to add custom code snippets - HivePress Help Center):

Maybe you got me wrong bro, i don’t want to Manually approve changes for location, i want to allow user to change location without moderation.

“NO MODERATION FOR LOCATION CHANGE”

“Allow edit location attribute from account/listing” “No moderation required” No manually approve changes for location attribute.

Hi,

Sorry for the confusion.

This field does not require additional confirmation by default if you have not made any customizations.

But if you have added this attribute in Listings > Attributes, then I recommend disabling the moderation feature (Manually approve changes), and this attribute will not require additional confirmation.

No, i have not made any additional attribute for location, this is by default by hivepress & geolocation.
i have not made and customizations.
please help

Hi,

Please check if you have disabled the Manually approve new listings feature in HivePress > Settings > Listings.

Please check screenshot
12

if i enable or disable manually approve changes option, in both situation listing status mark as a pending & request comes to my panel for approval.

i tried below snippets, but its not working

add_filter(
	'hivepress/v1/forms/listing_update',
	function( $form ) {
		$form['fields']['location']['_moderated'] = false;

		return $form;
	}
);

what to do now :frowning: :sob: :sob:

Hi,

There are three reasons why this may be displayed:

  1. Moderation feature for listings is enabled.

  2. You have a listing attribute that requires manual confirmation.

  3. You have added PHP snippets to your site, causing this issue.

Please check the first two reasons, also, please disable third-party plugins and customizations (if there are any) and check if this issue persists. If you use a caching plugin, make sure that caching is disabled for logged-in users.

Now i dis-select “Manually approve changes” option from all listing attribute. so location field update without moderation successfully.
now my issue is i don’t want to allow edit few listing field to listing owner. now how its possible ?
or can i block few listing field so no one can edit that.

please help

& below code is working for title & location only, its not working for description and few more attribute field

add_filter(
	'hivepress/v1/forms/listing_update',
	function( $form ) {
		$form['fields']['title']['readonly']=true;
		
		return $form;
	},
	1000
);

add_filter(
	'hivepress/v1/forms/listing_submit',
	function( $form ) {
		$form['fields']['title']['readonly']=false;
		
		return $form;
	},
	1000
);

Hi,

If these are custom attributes, you just need to unmark them as Editable.
All other settings will require customization.

If customizations are required for your site, please try customizing it using the collection of code snippets Search · user:hivepress · GitHub and other developer resources, or consider hiring someone for custom work https://fvrr.co/32e7LvY

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