WooCommerce and WordPress: order messages and login codes
No-code order updates through Automations, or a few lines of PHP for messages and login codes.
6 min read
Order updates without code
WooCommerce → Settings → Advanced → Webhooks: add the address from WhatsApp Corner → Automations for Order created or Order updated.
With PHP
- 1Put your key in wp-config.php as an environment value, never in a theme file anyone can download.
- 2Hook into a WooCommerce event, for example woocommerce_order_status_completed, and send the template with wp_remote_post to /api/v1/wa/messages.
- 3For login codes, add a step to your login or registration form: send the code with /api/v1/wa/verify, then check it with /api/v1/wa/verify/check before letting the person in.
Did this answer your question?
Not quite — ask our team