How to change Price per day into price perperson

Hi,
is there any way to change the price quote per person?. instead, I know that the price-setting is multiplied by quote per day and per person, what I want is to make it the price just per person not quote per day…

Please try this PHP snippet

add_filter(
'hivepress/v1/models/listing/cart',
	function($meta, $listing){
		if(isset($meta['args']['_quantity'])){
			$meta['args']['_quantity'] = 1;
		}
		
		return $meta;
	},
	1000,
	2
);

Hi Yevhen,
Thank you for your php snippet code.

Just copy paste the code on php snippet code plugin. but it does not work. see attached where I paste the code.

is there any other code / or way to do it?

I just need the price quote base on per person, that’s it.

Once thanks for your help.

Please make sure that the snippet was correctly added with Code Snippets or another similar plugin. It was tested locally and it seems to be ok

Hi Yevhen,

I have checked the code snippet is active, but the code still does not work on my side. please refer to the attached files.

Also, the /day text still shows up not changed to /person

For your information, I’ve seen some PHP code snipped tutorials on youtube, to get a better understanding of implementing the snipped code.
So what next? is there any way we can do this work?


Please send temporary WP access via email to support@hivepress.io with a link to this topic and any extra details that may help detect this issue, and we’ll check it. You can send a temporary admin access link using this plugin Temporary Login Without Password – WordPress plugin | WordPress.org

Hi Yeven,
Thank you very much for your concern. Just email the temporary wp access to support@hivepress.io as per required.

Thank you for your help.

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