Import Button Shown when Allow Imports is off

I’m still seeing the “Import Listings” button in Vendor dashboard although it is turned off in settings. I only want to Import Listings as admin. Should I hide with CSS or is there a bug here?

Thanks for reporting this, the bug is confirmed and we’ll fix it as soon as possible.

As a temporary fix please try this PHP snippet

add_filter(
	'hivepress/v1/templates/listings_edit_page',
	function($template){
		if(!get_option('hp_listing_allow_import')){
		$template = hivepress()->helper->merge_trees(
			$template,
			[
				'blocks' => [
					'page_content' => [
						'blocks' => [
							'listing_import_link' => [
								'type'   => 'content',
							],
						],
					],
				],
			]
		);
		}
		
		return $template;
	},
	1000
);

Thanks Yevhen!

1 Like

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