Set WhatsApp contact Phone is a WordPress ability from Joinchat — usable via Easy MCP AI, which connects Claude, ChatGPT, and any AI assistant to your site.
Install Free Plugin →Set WhatsApp contact Phone
WriteUpdate the WhatsApp phone number globally or for a specific post/term.
Requires the Joinchat plugin installed on WordPress 6.9+ with the Abilities API available (abilities register on the wp_abilities_api_init hook). The get-phone, set-phone, set-cta, and set-message abilities require the 'edit_posts' capability when a post_id or term_id context is supplied, or the capability returned by Joinchat_Util::capability() (defaults to 'manage_options', filterable via the 'joinchat_capability' filter) for global changes. The get-whatsapp-url ability has no permission check.
What it does
This ability writes a new WhatsApp phone number after cleaning it with Joinchat's formatting helper. If a post_id is supplied, it updates that post's _joinchat meta 'telephone' field; if a term_id is supplied, it updates the term's _joinchat meta instead; otherwise it updates the site-wide 'telephone' value in the joinchat option. Only one scope (post, term, or global) is applied per call, following the same priority order as get-phone. This lets an AI assistant change the contact number for one page, one category, or the whole site on request, returning a boolean indicating whether the underlying WordPress update call succeeded.
See it in action
You ask your AI assistant
"Set the WhatsApp contact number for post ID 42 to +34 600 000 000."
Inputs
| Name | Type | Required | Description |
|---|---|---|---|
| phone | string | Yes | WhatsApp phone number. |
| post_id | integer | No | Optional post ID for context-specific phone. Defaults to 0. |
| term_id | integer | No | Optional term ID for context-specific phone. Defaults to 0. |
Returns
A boolean indicating whether the update_post_meta, update_term_meta, or update_option call succeeded.
Permission
Requires the 'edit_posts' capability when a post_id or term_id is supplied, or the capability returned by Joinchat_Util::capability() (defaults to 'manage_options', filterable via 'joinchat_capability') when updating the global phone number.
More Joinchat abilities
Generate WhatsApp URL
Build a WhatsApp click-to-chat URL from a phone number and optional pre-filled message.
Get WhatsApp contact Phone
Read the WhatsApp phone number configured for the site, or for a specific post or term.
Set Call to Action
Update the call-to-action text shown with the Joinchat chat button, globally or per post/term.
Set WhatsApp pre-filled Message
Update the pre-filled WhatsApp message sent when a visitor starts a chat, globally or per post/term.