Addons
WhatsApp Contact Button
Adds a floating WhatsApp launcher so shoppers can message your sales or support team without leaving the storefront.
Behavior overview
WhatsappIntegrationAddonenqueues CSS/JS onwp_enqueue_scriptsand prints the floating button inwp_footer.- Assets live under
app/Addons/whatsapp_integration/assets/(SVG icon, styles, lightweight script). - Addon aborts if no phone number is configured or if it’s running in wp-admin.
- Context detection (product/cart/checkout/other) controls whether the button appears, based on the
display_contextsetting.
Settings reference
| Field | Key | Description |
|---|---|---|
| WhatsApp Number | phone_number |
Digits only (country code + number). Required or nothing renders. |
| Greeting Template | message_template |
Default: “Hi! I'm interested in {product}…”. Supports placeholders {product}, {price}, {url}, {site}. |
| Display Context | display_context |
Options: storefront (default), product_only, cart_checkout, all. |
| Button Position | button_position |
Bottom right (default) or bottom left. |
| Accent Color | accent_color |
HEX color validated via sanitize_hex_color(). Defaults to WhatsApp green (#25d366). |
Implementation checklist
- Enable the addon in Kitbix Commerce → Addons.
- Enter your phone number using digits only (no + signs or spaces).
- Customize the greeting template with localized copy; keep placeholders intact for dynamic substitution.
- Pick where the button should appear (position + display context).
- Open a storefront page and click the button to ensure it launches the correct
https://wa.me/link with prefilled message.
Tip: If your support hours vary, update the template to mention response windows.
Troubleshooting
- No button? Confirm the addon is enabled and that the phone number passes the regex (digits only).
- Context mismatch? Review
display_context; the addon short-circuits on pages without Kitbix shortcodes unless you choose “all”. - Color not changing? Ensure you’re supplying a valid HEX value (#RRGGBB). Invalid values fall back to the default green.
Reminder: The floating button is injected via
wp_footer. Themes that omit wp_footer() will never render the addon—fix the theme first.