WordPress powers 43% of the web — and most Indian business websites. Whether you're running a WooCommerce store, a service business, or a lead-gen site, this guide shows you exactly how to send WhatsApp from WordPress events — form submissions, order placed, user registration, post published — using WP hooks, the REST API, and plugin integrations.
WordPress's hook system (actions and filters) is the cleanest integration point. Every meaningful event in WordPress fires an action hook — you attach a function to that hook, and it calls WA.Expert API. No plugin needed. For non-developers, several WordPress plugins provide a visual interface.
| Integration approach | Complexity | Best for |
|---|---|---|
| WP Action Hooks + functions.php | ⭐⭐ Medium — PHP knowledge | Most direct. Add code to theme's functions.php or a custom plugin. |
| WP REST API endpoint trigger | ⭐⭐ Medium — REST API knowledge | External trigger via WordPress REST API → your custom endpoint → WA.Expert. |
| Contact Form 7 / Gravity Forms hook | ⭐ Easy — form plugin + PHP snippet | Fire WhatsApp on any CF7 or Gravity Form submission. |
| WooCommerce order hooks | ⭐ Easy — WooCommerce + PHP snippet | WooCommerce order status changes → WhatsApp. Most popular WP use case. |
| Plugin (WA.Expert WP plugin) | ⭐ Easy — no code | Install WA.Expert WordPress plugin — no PHP needed. |
Open Appearance → Theme File Editor → functions.php (or create a custom plugin for better practice). All WooCommerce + WhatsApp code goes here.
Use add_action("woocommerce_order_status_{status}", $callback, 10, 2). Replace {status} with: processing (payment received), completed (order fulfilled), or shipped (custom status). The callback receives $order_id and $order.
Use $order = wc_get_order($order_id). Then $phone = $order->get_billing_phone(). This gets the phone number entered at checkout. WA.Expert normalises Indian formats automatically.
Use WordPress's built-in wp_remote_post() function — safer than raw cURL in WP. Pass the WA.Expert API endpoint, headers, and JSON body. Check wp_is_wp_error() on the response.
Place a test order in WooCommerce (use WooCommerce's Test Mode). Check your phone for the WhatsApp. Check PHP error log for any issues (wp-content/debug.log if WP_DEBUG_LOG is enabled).
Use a custom plugin (not functions.php) for production code — theme updates will overwrite functions.php. Create a file wp-content/plugins/waexpert-integration/waexpert-integration.php with the plugin header comment and your hooks.
Use wpcf7_mail_sent action — fires every time a CF7 form is submitted successfully. Hook: add_action("wpcf7_mail_sent", $callback).
In callback: $submission = WPCF7_Submission::get_instance(). $data = $submission->get_posted_data(). Access fields by name: $data["your-phone"], $data["your-name"], $data["your-message"].
In CF7 form editor: add [tel your-phone] field with acceptance validation. This collects the phone for WhatsApp. Label it "WhatsApp Number" to increase fill rate.
Same wp_remote_post() approach as WooCommerce. Map form fields to WhatsApp template variables.
Three lines of PHP in your functions.php and every WooCommerce order fires a WhatsApp. Or install the WA.Expert WP plugin for zero-code setup.