WP Manifestindependent plugin directory
manifest / ecommerce / woocommerce-whatsapp-order-button

WhatsApp Order Button for WooCommerce

WooCommerce plugin that adds an Order on WhatsApp button to product and cart pages with product, quantity and price prefilled

★ 0stars

Install

Download source zip No release zip yet

This is the repository archive. It installs, but the folder name will carry the branch suffix and updates will not flow.

Install straight from GitHub with WP-CLI:

wp plugin install https://github.com/samirshah7/woocommerce-whatsapp-order-button/archive/refs/heads/main.zip
No built-in updater. New versions won't appear under Dashboard → Updates. Install new releases yourself, or let Git Updater track the repository.

Adds an Order on WhatsApp button to WooCommerce product and cart pages. When a customer taps it, WhatsApp opens with the product name, quantity, price and link already typed in. Useful for stores that close sales through chat.

Features

  • Button on the product page (uses the quantity the customer selected) and the cart page (lists all items and subtotal)
  • Admin settings page: WooCommerce > WhatsApp Order Button
    • WhatsApp number, button text, editable message template
    • Placeholders: {product}, {qty}, {price}, {url}
  • Uses the official wa.me click-to-chat link (no API key needed)
  • Mobile-friendly full-width button
  • Security: capability checks, sanitised settings (phone digits only), escaped output
  • Translation-ready (wc-whatsapp-order-button text domain)

Installation

  1. Upload the plugin folder to wp-content/plugins/ (or use Plugins > Add New > Upload Plugin).
  2. Activate it (WooCommerce must be active).
  3. Open WooCommerce > WhatsApp Order Button, enter your number with country code (e.g. 919876543210) and save.

How it works

  • Hooks: woocommerce_after_add_to_cart_button, woocommerce_proceed_to_checkout.
  • The product message is built on the server; a small JavaScript file swaps {qty} for the selected quantity on click. Without JavaScript the link still works with quantity 1.
  • Settings use the WordPress Settings API with a sanitise callback.

Limitations / roadmap

  • Variable products: the message uses the parent product name (variation details planned).
  • Button position is fixed; a shortcode and block are planned.
  • Classic cart only; the block-based cart needs a separate integration.

Requirements

WordPress 6.0+, WooCommerce, PHP 7.4+

Author

Sameer Shah