I would like to change the text on the send message screen when I send it to the seller from the ordered page, is there a way to do this?

I would like to change the text on the send message screen when I send it to the seller from the ordered page, is there a way to do this?

If any static text change is required, please try using Loco Translate, it’s the best solution whether you change some built-in field label, a modal window title, etc.

Thank you very much.

I believe there is a screen where you can send a message from the listing to the user and another screen where you can send a message to the user after the order is complete. I would like to change the message screen to different text, is that possible?


Please try this PHP snippet

$listing_message_filters = ['hivepress/v1/templates/listing_view_block', 'hivepress/v1/templates/listing_view_page'];

foreach ($listing_message_filters as $filter){
	add_filter( 
		'hivepress/v1/templates/listing_view_block', 
		function($template){
			return hivepress()->helper->merge_trees(
				$template,
				[
					'blocks' => [
						'message_send_modal' => [
							'title'  => 'Your content here for listing',
						],
					],
				]
			);
		},
		1000
	);
}

add_filter( 
		'hivepress/v1/templates/alter_order_footer_block', 
		function($template){
			return hivepress()->helper->merge_trees(
				$template,
				[
					'blocks' => [
						'message_send_modal' => [
							'title'  => 'Your content here for order page',
						],
					],
				]
			);
		},
		1000
	);

Thanks for providing the code.
However, when I edited the text in loco translate, the two submit screens have the same text. I want to change the text on the message send screen of the listing and the send screen from the buy button. I don’t know how to do this and would like to know how to do it.

Yes, Loco Translate will replace strings in all places. Please try the snippet provided above to change the text for the message modal on the listing and on the order page separately

Thanks for letting me know!

I just don’t know where to fix the code in the snippet above. What I want to fix is the part circled in red (the send message button on the purchase screen), but where should I modify the code? I would appreciate it if you could help me.

Please try to change the button with Loco Translate. It is possible to find this string in Loco Translate/Plugins/HivePress Messages. Please check this tutorial How to translate an extension - HivePress Help Center

Please try this PHP snippet to change the title for the message modal window on the listing and order page

$listing_message_filters = ['hivepress/v1/templates/listing_view_block', 'hivepress/v1/templates/listing_view_page'];

foreach ($listing_message_filters as $filter){
	add_filter( 
		$filter, 
		function($template){
			return hivepress()->helper->merge_trees(
				$template,
				[
					'blocks' => [
						'message_send_modal' => [
							'title'  => 'Your content here for listing',
						],
					],
				]
			);
		},
		1000
	);
}

add_filter( 
		'hivepress/v1/templates/order_footer_block', 
		function($template){
			return hivepress()->helper->merge_trees(
				$template,
				[
					'blocks' => [
						'message_send_modal' => [
							'title'  => 'Your content here for order page',
						],
					],
				]
			);
		},
		1000
	);

Before using the PHP snippet

After using the PHP snippet

Thank you very much.

I tried using loco translate after putting up the snipest and watching the reference video. However, the red circled text was not translated.

I would also like to change the letters in the areas circled in red to separate letters.

I would like to change the text on the two screens to different text.


Please try to change the text in the provided code snippet. As it is static text then it can not be changed with the Loco Translate plugin

Please try to change the buttons (which are in the red circle on the last screenshots) with Loco Translate. It is possible to find this string in Loco Translate/Plugins/HivePress Messages. Please check this tutorial How to translate an extension - HivePress Help Center

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