Add link for viewing the vendor profile

I noticed there is no direct way to access to my user profile. I can go to listing then select a listing, details and click on my profile or go to vendors and select my profile. But, there is no direct way to go there from the dashboard. I am wondering if there is a way to add a “view my profile” link under the amount of the balance.

Please try this PHP snippet as a temporary solution. We plan to add this to the upcoming updates, there were a few requests for it

add_filter(
	'hivepress/v1/templates/vendor_dashboard_page',
	function( $blocks, $template ) {
		$vendor = hivepress()->request->get_context('vendor');
		
		if(!$vendor){
			return $blocks;
		}
		
		return hivepress()->template->merge_blocks(
			$blocks,
			[
				'vendor_actions_secondary' => [
					'blocks' => [
						'custom_vendor_profile_link' => [
							'type' => 'content',
							'content' => '<a href="'.get_permalink( $vendor->get_id() ).'">View vendor profile</a>',
							'_order' => 1000
						],
					],
				],
			]
		);
	},
	1000,
	2
);
1 Like

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