I need to be able to add an icon so that users can consult with their expert before making an economic offer in the “request” section.
I saw a fragment that you provided as a solution to a follower of this channel on 30 June, but unfortunately it does not appear anywhere on the request screen when I want to make offers.
I don’t know what I’m doing wrong.
Thank you very much, here below I post the solution you provided.
add_filter(
'hivepress/v1/templates/offer_view_block',
function ( $template ) {
if(hivepress()->get_version( 'messages' )){
$template = hivepress()->helper->merge_trees(
$template,
[
'blocks' => [
'offer_actions_primary' => [
'blocks' => [
'message_send_modal' => [
'type' => 'modal',
'model' => 'vendor',
'title' => hivepress()->translator->get_string( 'send_message' ),
'_capability' => 'read',
'_order' => 5,
'blocks' => [
'message_send_form' => [
'type' => 'message_send_form',
'_order' => 10,
'attributes' => [
'class' => [ 'hp-form--narrow' ],
],
],
],
],
'message_send_link' => [
'type' => 'part',
'path' => 'vendor/view/block/message-send-link',
'_order' => 10,
],
],
],
],
]
);
}
return $template;
},
1000
);