Is it possible to restrict possibility to set Search Alerts to users with active Membership only?
Hi,
We plan to add restrictions to our other plugins, including Search Alerts and Statistics.
Meanwhile, please try this code snippet, which hides the Set Search Alert feature on the listings page:
add_filter(
'hivepress/v1/templates/listings_view_page',
function ( $template ) {
$membership = hivepress()->request->get_context( 'membership' );
if(!$membership) {
$template=hivepress()->template->merge_blocks($template, [
'listing_filter_form' => [
'footer' => [
'search_alert_toggle' => [
'type' => 'content',
],
],
],
]);
}
return $template;
},
1000
);
Hope this helps.
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.