=== Smart Chat Button === Contributors: mrsoukbh Donate link: https://linkze.me/donate-me Tags: whatsapp, chat, woocommerce, sticky button, floating button Requires at least: 3.7 Tested up to: 6.8 Requires PHP: 7.2 Stable tag: 1.3.0 License: GNU General Public License v2 or later License URI: https://www.gnu.org/licenses/gpl-2.0.html Add a beautiful, customizable WhatsApp chat button to your WordPress or WooCommerce site to boost customer engagement instantly. == Description == **Smart Chat Button** is a fast, lightweight, and highly customizable WordPress plugin that displays a beautiful floating WhatsApp chat button on your website. After clicking the button, users are taken directly to WhatsApp Mobile App or WhatsApp Web, depending on their device. This plugin supports: - ๐Ÿ“ฑ WhatsApp & WhatsApp Business integration - ๐Ÿ’ฌ Prefilled message with dynamic variables (e.g., `{product_title}`) - ๐ŸŽจ Custom icon upload - ๐ŸงŠ Modern glassmorphic floating button with animation - ๐Ÿ—จ๏ธ Sliding chat drawer with custom text & colors - ๐Ÿ› ๏ธ Modern, responsive admin settings panel - โ™ฟ Accessible markup with keyboard support - ๐ŸŒ Fully translatable (WPML & Polylang compatible) - ๐Ÿ›’ WooCommerce integration โ€“ show button only on product pages - ๐Ÿ“ Responsive positioning (Bottom Left / Bottom Right) - ๐Ÿ“ Customizable margins per device type (Mobile, Tablet, Desktop) Perfect for e-commerce stores, service providers, and customer support teams looking to improve engagement through direct messaging. == Installation == = From Your WordPress Dashboard = 1. Navigate to Plugins โ†’ Add New 2. Search for "Smart Chat Button" 3. Click Install Now, then Activate 4. Go to Settings โ†’ Smart Chat Button to configure = Manual Upload via FTP = 1. Download the plugin ZIP file 2. Unzip and upload the `smart-chat-button` folder to `/wp-content/plugins/` 3. Activate the plugin from the Plugins menu in WordPress == Frequently Asked Questions == = How do I set my WhatsApp number? = Go to **Settings > Smart Chat Button** and enter your WhatsApp number **with country code**, but without any special characters like `+`, `-`, `(`, `)` or spaces. Example: โœ… Use: `15551234567` โŒ Don't use: `+1 (555) 123-4567` = Can I change the position of the button? = Yes! You can choose between **Bottom Left** or **Bottom Right** positions from the settings page. = How can I display the button only on WooCommerce product pages? = Enable the option **"Only Show on Product Pages (WooCommerce)"** in the settings. This will hide the button on all non-product pages. = Can I add a prefilled message? = Yes! Enter your desired text in the **Default Message** field. You can also use `{product_title}` as a variable when using WooCommerce integration. = Is this plugin translation ready? = Yes! The plugin uses standard WordPress internationalization functions (`__()` and `echo esc_html__()`), and comes with a `.pot` file inside the `languages` directory. You can easily translate it into any language using tools like Loco Translate or Poedit. = Does this plugin affect site speed? = No! Itโ€™s built with performance in mind. No external JavaScript libraries or unnecessary assets are loaded. Only a small inline CSS and script in footer. == Changelog == = 1.3.0 = โœจ New Features Team Members Support: Add and manage multiple WhatsApp agents via admin with names, roles, numbers, avatars, and enable/disable toggle. Modern Admin Design: Improved, flatter card-style admin settings UI with tabbed navigation and better responsive styles. Button Click Stats: New โ€œStatsโ€ tab in admin to view total and daily button click counts for the last 7 days. Custom Icon Upload: Set a custom WhatsApp icon from the Media Library or use the default SVG. Preview Updates: Live icon preview in the admin design settings. More Controls: Margin controls for mobile, tablet, desktop and per-device button visibility toggles. Role/Avatar Support: Team member role and avatar fields, with preview and easy upload. ๐Ÿž Fixes & Improvements Fixed: Button and modal positioning now responds to left/right setting and margin controls. Fixed: Escaping and sanitization improvements for all dynamic output (PHPCS compliance). Fixed: Button/box, icon and team member UI now more accessible and consistent. Fixed: โ€œShow only on WooCommerce product pagesโ€ logic. Fixed: Click tracking logic is now more robust. Fixed: SVGs and uploaded avatars are displayed securely and responsively. Fixed: Various CSS and responsive issues on settings and frontend. Fixed: Settings tabs navigation and state on reload. Improved: Codebase now follows WordPress coding standards and best security practices. ๐Ÿš€ Upgrade Notes Please review your โ€œTeam Membersโ€ tab after updating, and re-save settings to ensure new data structures are initialized. If you use caching, clear after update to see frontend changes. = 1.2.0 = * Added Stats tab to view WhatsApp click counts * Counts are tracked via AJAX without reloading the page * Minor style and version updates = 1.1.0 = * Added media library icon selector and improved escaping * Redesigned admin settings panel with responsive layout * Added helper for secure image output * Fixed escaping issues flagged by Plugin Check * Versioned asset loading for better caching * Added Elementor widget for custom WhatsApp chat buttons * Added customizable sliding chat drawer * New glassmorphic floating button style * Color pickers and text fields in settings = 1.0.0 = * Initial release * Basic WhatsApp chat button functionality * Positioning options * Margin settings per device type == Screenshots == 1. screenshot-1.png - WhatsApp Button Settings (General) 2. screenshot-2.png - WhatsApp Button Settings (Position & Styling) 3. screenshot-3.png - WhatsApp Button with Floating Text Bubble (Bottom Left) 4. screenshot-4.png - WhatsApp Button without Text Bubble (Bottom Left) 5. screenshot-5.png - WhatsApp Button with Floating Text Bubble (Bottom Right) 6. screenshot-6.png - WhatsApp Button without Text Bubble (Bottom Right)