Unlimited Elements- WhatsApp Chat Widget – Message Issue resolved

I recently used Unlimited Elements for Elementor plugin- WhatsApp  Chat widget and found that, if a visitor of my website clicks on the chat more than once it repeats the text value in the message box.

If you have also faced the same issue, I have a solution for you.

WhatsApp Chat Widget

Message Before

Hi, I am interested in your services./?text=Hi, I am interested in your services.

Whenever a visitor clicks twice the text in the box was not proper.

Message I want

Hi, I am interested in your services.

Whenever a visitor clicks the message should contain text which is written in the message box.

Reason of the Problem

After looking at the JavaScript of the widget I found that the code creates a link by concatenating Whatsapp link + Number + Text, which is correct. But the Link created is again updated with the Text in the message box every time a visitor clicks send button.

Solution

The solution is that- you need to edit the JavaScript of the widget. You can find the the link and location of the JS by clicking Edit icon the widget, the go to JS/CSS includes section

Edit Whatsapp Widget

Get the path of the JS from the the JS.

Then you need to go to File Manger and find the JS.

Edit the JS and change the below code.

In my case the path is – wp-content/uploads/ac_assets/whatsapp_chat/ue-whatsapp-widget.js

Code to Edit in the Whatsapp widget JS

Replace the code with below code-

const sentBtnLink = ‘https://wa.me/yournumber’ + ‘/?text=’ + sendBtnMsg;

Replace it for other positions also if you want to use other options too.

 

Then Save it.

 

Thanks

Vishal Gupta