Devify WhatsApp Chat
Highly configurable WhatsApp live chat widget (Wati-style bubble + preview card). Works on any theme.
by Saad Sohail Khan · github.com/saadsk-tech/devify-whatsapp-chat · website
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/saadsk-tech/devify-whatsapp-chat/archive/refs/heads/main.zipA highly configurable WhatsApp live-chat widget for WordPress: a floating launcher with a polished preview card (think of the familiar "chat bubble" pattern), a one-tap link straight into a WhatsApp conversation, and a smart pre-filled message that adapts to the page the visitor is on. Works on any theme, with no page builder required.
Features
- Floating launcher + preview card with brand header, avatar, welcome message, and call-to-action button
- Smart pre-filled messages with dynamic tokens:
{page_title},{page_link},{site_name},{site_url} - Fully themeable from a settings screen — accent colour, text colour, fonts, radius, launcher size, position, offsets, and z-index
- Display rules — device visibility (all / desktop / mobile), optional display delay, hide for logged-in users
- Shortcode for inline "message us" links anywhere in content
- Customizer integration for live, visual previewing
- Developer-friendly — a dozen filters and a theme-overridable template
- Privacy-respecting — no third-party scripts; the widget is a styled link to
wa.me - Translation-ready, with
uninstall.phpcleanup and a WordPress.org-formatreadme.txt
Install
- Copy
devify-whatsapp-chatintowp-content/plugins/ - Activate it under Plugins
- Configure at Settings → WhatsApp Chat, or define the number in
wp-config.php:
define( 'DWC_WHATSAPP_NUMBER', '+15551234567' );
Shortcode
[whatsapp_chat]
[whatsapp_chat label="Message us" message="Hello from {page_title}"]
Architecture
devify-whatsapp-chat.php Bootstrap: constants, optional wp-config number, boot
includes/
class-dwc-plugin.php Singleton controller; shortcodes; activation
class-dwc-settings.php Settings storage, defaults, sanitization
class-dwc-config.php Builds the runtime widget config (colours, copy, URL)
class-dwc-frontend.php Enqueues assets, decides visibility, renders the widget
class-dwc-admin.php Settings page wiring
class-dwc-customizer.php Live Customizer controls
functions.php Helpers: phone sanitize, wa.me URL, message tokens
views/settings-page.php Admin settings UI
templates/
widget.php Front-end markup (theme-overridable)
assets/ Widget + admin CSS and JS
uninstall.php Removes plugin options on delete
Each concern lives in its own class, wired through a singleton controller — so the URL building, the settings, the rendering, and the admin UI can each be read and changed independently.
Template override
Drop a copy in your active theme to fully control the markup:
wp-content/themes/your-theme/devify-whatsapp-chat/widget.php
…or filter dwc_whatsapp_template_path.
Hooks
| Hook | Purpose |
|---|---|
dwc_whatsapp_number |
Phone number |
dwc_whatsapp_chat_enabled |
Global on/off |
dwc_whatsapp_should_display |
Per-request visibility |
dwc_whatsapp_widget_config |
Full config array |
dwc_whatsapp_chat_url |
wa.me URL |
dwc_whatsapp_message_tokens |
Token replacements |
dwc_whatsapp_sanitize_settings |
Settings on save |
dwc_whatsapp_template_path |
Template file path |
dwc_whatsapp_before_render |
Before markup |
dwc_whatsapp_after_render |
After markup |
Requirements
WordPress 6.0+, PHP 7.4+, and a WhatsApp-enabled phone number. No external accounts or API keys — the widget links directly to WhatsApp's standard wa.me URLs.
License
GPL-2.0-or-later. Built by Saad Sohail · saad@devify.digital