Hi,
I have the Taskhive theme, and I want to replace the “accept offer” button in the request page with a Vendor link.
Ihor told me there is possible with the code snippet. Can you send me please this snippet?
Thanks and have a nice day!
Hi,
I have the Taskhive theme, and I want to replace the “accept offer” button in the request page with a Vendor link.
Ihor told me there is possible with the code snippet. Can you send me please this snippet?
Thanks and have a nice day!
Please try this PHP snippet
add_filter(
'hivepress/v1/templates/offer_view_block/blocks',
function ($blocks, $template){
if ( hivepress()->get_version( 'marketplace' ) ) {
$blocks = hivepress()->helper->merge_trees(
[ 'blocks' => $blocks ],
[
'blocks' => [
'offer_actions_primary' => [
'blocks' => [
'vendor_view_link_custom' => [
'type' => 'part',
'path' => 'offer/view/vendor-view-link',
'_order' => 10,
],
'offer_accept_form' => [
'type' => 'content,'
]
],
],
],
]
)['blocks'];
}
return $blocks;
},
1000,
2
);
Please try this PHP snippet instead
add_filter(
'hivepress/v1/templates/offer_view_block/blocks',
function ($blocks, $template){
if ( hivepress()->get_version( 'marketplace' ) ) {
$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
);
Hi Yevhen,
Great, thank you.
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.