Set Call to Action 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 Call to Action

Write
Joinchat Email & CRM joinchat/set-cta

Update the call-to-action text shown with the Joinchat chat button, globally or per 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 sets the call-to-action (CTA) text displayed with Joinchat's chat button, sanitizing the input with sanitize_text_field before saving. Depending on which context input is supplied, it writes to a post's _joinchat meta ('message_text'), a term's _joinchat meta, or the site-wide 'message_text' value in the joinchat option, following the same post/term/global priority as the other context-aware abilities. An AI assistant can use this to tailor the invitation message shown to visitors on a specific page, category, or across the whole site, and it returns a boolean reflecting whether the update succeeded.

See it in action

You ask your AI assistant

"Set the call-to-action text for the Electronics category (term ID 15) to 'Questions about this product? Chat with us on WhatsApp!'"

Inputs

Name Type Required Description
cta string Yes Call to Action text.
post_id integer No Optional post ID for context-specific CTA. Defaults to 0.
term_id integer No Optional term ID for context-specific CTA. 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 CTA.

Newsletter

The AI + WordPress space moves fast. Keep up.

New tools, workflow ideas, and product updates — be the first to know what's next.

No spam, unsubscribe anytime.