Hi there!
Probably this shortcode with combination of unique tag is better for your purpose:
https://www.better-messages.com/docs/shortcodes/better_messages_live_chat_button/
Thanks!
Thread Starter
samrot
(@samrot)
Thx for your reply.
Should the unique_tag be something like the current post id for example ($post_id = get_the_ID();)?
Thread Starter
samrot
(@samrot)
Applied. So when users don’t have an open conversation already they get a new conversation with the correct subject (from the post title where they hit the PM button) but when the users alredy have a conversation open from another post, it opens that conversation instead of a new one.
We have fast_start=”1″ on the shortcode and also on the backend configuration of the plugin have activated the ‘Fast start’ option (when fast_start=”0″ on the shortcode no new conversations are created so the users can’t chat).
Help?
Thread Starter
samrot
(@samrot)
I have a function with the following:
$author_title = get_the_author_meta('first_name');
$subject = get_the_title();
echo do_shortcode('[better_messages_pm_button text="PM author" subject="' . $subject . '" target="_self" unique_tag="' . $post_id . '" fast_start="1" url_only="0"]');
Thread Starter
samrot
(@samrot)
Yes that’s the one I’m using but it’s not working for when the user already have a conversation open with the author from another post, it opens that conversation instead of a new one with the subject of the current post where they click on the pm button.
The code I sent you was wrong sorry, this is part of the code I’m using:
$post_id = get_the_ID();
$subject = get_the_title();
echo do_shortcode('[better_messages_pm_button text="PM author" subject="' . $subject . '" target="_self" unique_tag="' . $post_id . '" fast_start="1" url_only="0"]');
What can I do to achieve what we need?
Thank you! Hope you can help us.
Thread Starter
samrot
(@samrot)
sorry, I misunderstood, that link you sent worked perfectly.
Thx!!!