Custome message text for whatsapp attribute

i have added whatsapp button on attribute section with this code.


its working perfectly fine,
“but i want to send listiing url along with message chat, what to do?” so Lister know about inquiry purpose.

ok i found this code also

	function( $fields, $vendor ) {
		$queried_object = get_queried_object();
		if(is_object($queried_object) && 'hp_listing' === $queried_object->post_type){
			$listing = HivePress\Models\Listing::query()->get_by_id( $queried_object->ID );
				foreach ( $fields as $name => $field ) {
				if ( isset( $field['display_template'] ) && strpos( $field['display_template'], '%listing_url%' ) !== false ) {
					$fields[ $name ]['display_template'] = str_replace( ['%listing_url%', '%listing_title%'], [get_permalink( $listing->get_id()), $listing->get_title()], $field['display_template']);

		return $fields;

whats changes i have to do with this code? 

or, can i manage some custom text for ex. " I got your number from , please contact me.

Please send more details that may help to detect or reproduce this issue (e.g., screenshots, where do you want to show this text).

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