Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OneClick WP Hello

A fully-featured WhatsApp contact and sharing plugin for WordPress. Add a shortcode button, a floating button, an agent-selection popup, a share button, business-hours scheduling, a chat teaser bubble, click analytics, and more — all from a clean tabbed settings panel, no coding required.

WordPress Tested up to PHP License Version WordPress.org


Features

Contact Button

  • Shortcode [wa-hello] — place a WhatsApp contact button in any post, page, or widget
  • Per-instance overrides via shortcode attributes: phone, text, message, align, agent
  • Custom pre-filled message with dynamic variable support
  • Button alignment — Left, Center, or Right (global default + per-shortcode override)
  • Show on all devices or mobile only
  • GDPR-ready: disable until visitor accepts your Privacy Policy
  • Open in new tab option

Floating Button

  • Fixed-position button displayed site-wide
  • Left or right screen position
  • Three styles: Circle, Pill (icon + label text), Square
  • Optional tooltip with hover animation and customisable colours
  • Hide on mobile (viewport ≤ 768 px)
  • Open in new tab option

Multiple Agents

  • Unlimited WhatsApp contacts — each with name, role, phone, message, and avatar
  • When two or more agents are active → accessible agent-selection popup
  • When one agent is active → direct link, no popup
  • Three popup styles: Classic, Minimal, Dark
  • Per-agent shift scheduling (days + hours)
  • Target a specific agent from the shortcode: [wa-hello agent="2"]

WhatsApp Share Button

  • Shortcode [wa-hello-share] — let readers share the current post in one click
  • Per-instance overrides: text, align
  • Button alignment — Left, Center, or Right (global default + per-shortcode override)
  • Auto-inject above content, below content, or both
  • Device visibility: All / Mobile only / Desktop only
  • Customisable share message template with dynamic variable support
  • Gutenberg block included

Business Hours & Availability

  • Global weekly schedule — active days, open time, close time
  • Full timezone selector
  • Offline behaviour: show normally, hide, show status badge, or show offline message
  • Online / offline status dot on the floating button
  • Per-agent shift scheduling works independently alongside global schedule

Dynamic Message Variables

Tokens resolved client-side at the moment of click — always current:

Token Resolves to
{page_title} Current page title
{page_url} Current page URL
{site_name} Site name
{site_url} Site URL
{site_tagline} Site tagline
{current_date} Today's date
{current_time} Current time
{post_author} Post author name
{post_date} Post publish date
{post_excerpt} Post excerpt
{post_category} Post primary category

Display Rules

  • Show everywhere, include list, or exclude list
  • Post type checkboxes
  • Specific post/page ID list
  • Homepage and archive toggles
  • Per-post / per-page meta box override (Force Show / Force Hide)

Appearance

  • Independent colour controls for shortcode button, floating button, and share button
  • Background, text/icon, and hover colours
  • Button size: Small / Medium / Large
  • Border radius: Pill / Rounded / Square
  • Drop shadow toggle
  • Pulse animation: Off / Always / Timed (configurable interval)
  • Tooltip background and text colour

Chat Teaser Bubble

  • Speech bubble above the floating button to prompt visitors
  • Trigger: Immediate / Time delay / Scroll depth
  • Typing animation (three-dot indicator)
  • Cookie-based auto-dismissal with configurable re-show period
  • Mobile visibility toggle

Analytics

  • Built-in click counter per button type (shortcode, floating, agent popup, share)
  • Per-agent click breakdown
  • WordPress Dashboard widget
  • Optional Google Analytics 4 (gtag) event integration
  • Optional Facebook Pixel (fbq) event integration
  • Configurable event names per button type
  • Stats reset

Advanced

  • Export all settings + agent profiles as JSON
  • Import from JSON (allowlisted keys only)
  • Reset to plugin defaults
  • Opt-in data deletion on uninstall

Requirements

Requirement Minimum
WordPress 6.2
PHP 7.4
Tested up to (WordPress) 7.0
Tested up to (PHP) 8.4

No additional libraries or build tools required. No database tables created.


Installation

From WordPress.org (recommended)

  1. Go to Plugins → Add New in your WordPress dashboard.
  2. Search for OneClick WP Hello.
  3. Click Install Now → Activate.

Manual upload

  1. Download the .zip from WordPress.org.
  2. Go to Plugins → Add New → Upload Plugin, upload the zip, click Install Now.
  3. Activate the plugin from the Plugins screen.

From source (this repository)

  1. Clone or download this repository into your wp-content/plugins/ directory:
    git clone https://github.com/walterpinem/oneclick-whatsapp-hello.git wp-content/plugins/oneclick-whatsapp-hello
  2. Activate from Plugins in the WordPress dashboard.

Quick Start

  1. After activation go to WP Hello in the left admin menu.
  2. Enter your WhatsApp number (digits only, with country code, e.g. 6281234567890) on the Button & Shortcode tab.
  3. Place [wa-hello] in any post, page, or widget to display the contact button.
  4. To enable the floating button, go to the Floating Button tab and check Display Floating Button.
  5. To add team members, open the Agents tab.

Shortcode Reference

Contact button

[wa-hello]
[wa-hello phone="6281234567890" text="Chat Now" message="Hi!" align="center"]
[wa-hello agent="2"]
Attribute Default Description
phone (admin setting) WhatsApp number with country code
text (admin setting) Button label
message (admin setting) Pre-filled WhatsApp message
align (admin setting) left / center / right
agent — Force a specific agent by ID

Share button

[wa-hello-share]
[wa-hello-share text="Share this article" align="center"]
Attribute Default Description
text (admin setting) Button label
align (admin setting) left / center / right

Repository Structure

oneclick-whatsapp-hello/
├── whatsapp-hello.php          # Plugin bootstrap
├── uninstall.php               # Data cleanup on deletion
├── readme.txt                  # WordPress.org readme
├── includes/
│   ├── class-ocwahello-admin.php
│   ├── class-ocwahello-agents.php
│   ├── class-ocwahello-analytics.php
│   ├── class-ocwahello-appearance.php
│   ├── class-ocwahello-availability.php
│   ├── class-ocwahello-frontend.php
│   ├── class-ocwahello-importexport.php
│   ├── class-ocwahello-settings.php
│   ├── class-ocwahello-share.php
│   ├── class-ocwahello-teaser.php
│   ├── class-ocwahello-visibility.php
│   ├── functions-sanitize.php
│   ├── functions-svg.php
│   ├── functions-utility.php
│   ├── whatsapp-hello-button.php
│   └── whatsapp-hello-gdpr.php
├── assets/
│   ├── css/                    # Frontend and admin stylesheets
│   └── js/                     # Frontend and admin scripts
├── blocks/
│   ├── wa-hello-contact/       # Gutenberg contact button block
│   └── wa-hello-share/         # Gutenberg share button block
├── admin/                      # Admin-side views / partials
└── languages/
    ├── oneclick-whatsapp-hello.pot
    ├── oneclick-whatsapp-hello-id_ID.po
    └── oneclick-whatsapp-hello-id_ID.mo

Developer Notes

  • No database tables — all settings stored in a single serialised wp_options row (ocwahello_settings).
  • Conditional asset loading — agents, availability, and teaser CSS/JS are enqueued only when those features are active.
  • Security — nonce verification on all forms and REST endpoints; capability checks (manage_options) on all admin actions; all output escaped; import uses an allowlist of known keys.
  • Rate limiting — analytics REST endpoint is limited to 30 requests per IP per hour via transients.
  • Translation — text domain oneclick-whatsapp-hello; .pot file included. To regenerate:
    wp i18n make-pot . languages/oneclick-whatsapp-hello.pot --domain=oneclick-whatsapp-hello
  • Uninstall — opt-in data deletion; when enabled, removes all options, transients, and analytics on plugin deletion.

Translations

Locale Language Status
id_ID Indonesian (Bahasa Indonesia) Bundled

Contributions for additional languages are welcome. Open a pull request with your .po file.


Changelog

1.0.0 — May 2026

Major rewrite. Highlights:

  • Multiple agents with accessible agent-selection popup (Classic / Minimal / Dark styles)
  • WhatsApp Share Button with auto-inject and Gutenberg block
  • Dynamic message variables (11 tokens)
  • Business hours / availability scheduling with per-agent shift support
  • Display rules with per-post meta box override
  • Full appearance customisation (colours, size, border radius, pulse animation)
  • Floating button style variants (Circle / Pill / Square)
  • Button alignment control for shortcode and share buttons
  • Chat teaser bubble with typing animation
  • Click analytics with GA4 and Facebook Pixel integration
  • Import / Export / Reset settings
  • Tabbed admin panel (10 tabs)

0.1.0 — December 2019

  • Rebranded to OneClick WP Hello; code cleanup

0.0.1–0.0.3 — February 2019

  • Initial release and early fixes

License

This plugin is licensed under the GNU General Public License v3.0.


Author

Walter Pinem


Also by the Author

Running a WooCommerce store? Meet OneClick Chat to Order — purpose-built WhatsApp integration for WooCommerce:

  • WhatsApp Buy Now and Add to Cart via Chat buttons on product pages
  • Sends product name, price, quantity, and variations automatically
  • Cart page WhatsApp checkout button
  • Multiple store agents and sales representatives
  • Thousands of active WooCommerce stores worldwide

WordPress.org page · Documentation

About

OneClick WP Hello will make it easier for your readers to contact you directly through WhatsApp with a single click using a custom shortcode or a floating button. Get connected with your audience is easier than ever!

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages