Fake Chat Widget
WordPress plugin that adds a floating WhatsApp button that simulates a chat conversation.
Install
No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:
wp plugin install https://github.com/bernethe/fake-chat-widget/archive/refs/heads/main.zipWordPress plugin that adds a floating chat widget built specifically for WhatsApp: it opens a window, shows the "typing..." animation, and after the configured time, a message appears along with a notification sound. A "Start Conversation" button takes the visitor directly to WhatsApp with the configured number.
It does not depend on external CSS frameworks (no Tailwind or similar libraries), so it does not conflict with the site's theme. The front-end JavaScript is written in a syntax compatible with older browsers.
Developed by ..::BERNETHE::..
Features
- Floating WhatsApp button with opening, "typing...", and message animations.
- Notification sound when the simulated message is received.
- "Start Conversation" button that opens WhatsApp with the configured number.
- Avatar image picker using WordPress's own media library.
- Fully configurable from the admin area, no code required.
- Translated into Spanish, Portuguese (Brazil and Portugal), and French.
- Compatible with PHP 7.4+ and WordPress 5.0+.
Installation
- Download or clone this repository into
/wp-content/plugins/, or upload the.zipfile from the WordPress admin area (Plugins → Add New → Upload Plugin). - Activate the plugin from the Plugins menu.
- Go to Settings → Fake Chat and configure the avatar, name, WhatsApp number, message, and delay.
- Save the changes. The floating button will appear automatically on every page of the site once the WhatsApp number is set.
Configuration
From Settings → Fake Chat you can define:
| Option | Description |
|---|---|
| Avatar image | Shown in the chat header. If left empty, the default WhatsApp icon is used. |
| Name | Name of the company or person shown as the message sender. |
| WhatsApp number | Country code + number, digits only, no +, spaces, or dashes (e.g. 50612345678). |
| Message | Text shown as received after the "typing..." animation. Supports multiple lines. |
| Delay (seconds) | Time the "typing..." animation is shown before the message appears (1–30 s). |
The widget is only displayed on the site if the WhatsApp number field is not empty.
Project structure
fake-chat-widget/
├── assets/
│ ├── audio/beep.mp3 # Notification sound
│ ├── css/whatsapp-emule.css
│ └── js/
│ ├── admin.js # Avatar picker in the admin area
│ └── whatsapp-emule.js # Front-end widget logic
├── includes/
│ ├── admin-settings.php # Settings page
│ ├── frontend.php # Front-end asset enqueueing
│ └── helpers.php # Default options, getters, and sanitization
├── languages/ # .po/.mo files and .pot template
├── fake-chat-widget.php # Main plugin file
└── readme.txt # Readme in WordPress.org format
Requirements
- WordPress 5.0 or later
- PHP 7.4 or later
Available languages
- Spanish (es_ES)
- Portuguese – Brazil (pt_BR)
- Portuguese – Portugal (pt_PT)
- French (fr_FR)
Frequently Asked Questions
The button does not appear on the site The widget is only displayed if a WhatsApp number is set under Settings → Fake Chat.
How should I enter the phone number?
Include the country code followed by the number, digits only, no spaces, +, or dashes. Example: 50612345678.
Can I leave the avatar empty? Yes. If you don't select an image, the default WhatsApp icon will be shown.
Changelog
1.0.2
- Renamed the plugin to "Fake Chat Widget" to avoid using the WhatsApp trademark in the plugin name, per WordPress.org plugin guidelines. Functionality is unchanged and remains focused on WhatsApp.
- Added a "License" declaration to the plugin header (GPLv2 or later).
- Removed the manual
load_plugin_textdomain()call, discouraged since WordPress 4.6. - Fixed a missing "translators:" comment placement flagged by Plugin Check.
- Updated "Tested up to" to 7.0 and shortened the readme short description to meet the 150-character limit.
1.0.1
- Added Spanish, Brazilian Portuguese, European Portuguese, and French translations.
- Fixed the floating and close button styles being overridden by some themes.
- Raised the minimum required PHP version to 7.4.
1.0.0
- Initial release.
License
GPLv2 or later — https://www.gnu.org/licenses/gpl-2.0.html
Author
..::BERNETHE::.. — https://profiles.wordpress.org/bernethe/