Remove Marketplace functionality from Requests

I’d like to remove the Marketplace functions from Requests (accept and pay for offer) as if Marketplace was not installed. But need Marketplace installed for listings.

Please check setting Allow bidding on requests in HivePress/Settings/Offers. If it is disabled/unchecked then the user can not set the price for the offer

I thought that would work too, but it does not. Although it removes the “set offer price”, the Buyer still receives an Accept Offer button. When Accept Offer button is clicked, it takes them to the Homepage? I need it to function like it does without Marketplace installed where they can simply view the seller profile to contact them or ideally send them a message from the Request page.

Please try this PHP snippet. If Allow bidding on requests option is disabled then Accept Offer button will be replaced with View Vendor button

add_filter( 
	'hivepress/v1/templates/offer_view_block/blocks', 
	function($blocks, $template){
		
		if(!get_option('hp_offer_allow_bidding')){
			$blocks = hivepress()->helper->merge_trees(
					[ 'blocks' => $blocks ],
					[
						'blocks' => [
							'offer_actions_primary' => [
								'blocks' => [
									'vendor_view_link'  => [
										'type'   => 'part',
										'path'   => 'offer/view/vendor-view-link',
										'_order' => 10,
									],

									'offer_accept_form' => [
										'type'   => 'content',
									],
								],
							],
						],
				]
				)['blocks'];
		}
		return $blocks;
	}, 
	1000, 
	2 
);
1 Like

That works well. Thank you.

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