Hi,
Is there a code snippet that will hide the prices for users that arent signed in?
Thanks
Hi,
Is there a code snippet that will hide the prices for users that arent signed in?
Thanks
Please try this PHP snippet
add_filter(
'hivepress/v1/models/listing/attributes',
function( $attributes ) {
if(!is_user_logged_in()){
if(isset($attributes['price'])){
$attributes['price']['display_format'] = '';
}
}
return $attributes;
},
1000
);
Works perfect, thanks
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.