Embeds the Wemdo AI Agent chat widget on any WordPress site.
- WP.org listing: https://wordpress.org/plugins/wemdo-ai-agent/ (pending review)
- Backend SaaS: https://ai.wmd.hr
- License: GPLv2+
- Adds a settings page at Settings → Wemdo AI Agent where the admin pastes their Wemdo API key
- Renders a single
<script>tag inwp_headthat loads the AI Agent widget from Wemdo's CDN - Display rules: all pages / posts only / pages only / disabled, plus per-URL hide list
- Auto-detects WordPress locale and forwards a 2-char language hint to the widget
- Designed to coexist with WooCommerce, Polylang/WPML, Elementor/Divi/Bricks, and major caching plugins
Visitor chat traffic goes directly browser → Wemdo backend. The plugin doesn't proxy messages through WordPress, so it has zero performance impact on the host site.
Widget colors, conversational behavior, knowledge base, operator queue — all of those are configured in the Wemdo admin panel, not here. Single source of truth prevents config drift if the tenant runs multiple sites.
composer install
./vendor/bin/phpunit # 4 unit tests for the locale mapperManual integration testing on a real WP install (recommended via Herd or any local WP):
- Symlink or copy this repo into
wp-content/plugins/wemdo-ai-agent/ - Activate plugin in WP admin
- Settings → Wemdo AI Agent: paste a real
ak_key from https://ai.wmd.hr/admin/api-keys - Click Verify → expect green "Connected to tenant {name}"
- Save Changes, then visit any front-end page → page source contains:
<!-- Wemdo AI Agent v1.0.0 --> <script src="https://ai.wmd.hr/widget/chat.js" data-api-key="ak_..." data-lang="en" async></script>
Three places to bump on every version:
wemdo-ai-agent.phpplugin headerVersion:wemdo-ai-agent.phpconstantWEMDO_AI_AGENT_VERSIONreadme.txtStable tag:
Then:
git tag -a v1.0.0 -m "v1.0.0"
git push origin main v1.0.0WP.org submission is one-time at https://wordpress.org/plugins/developers/add/. After approval, future releases land via SVN sync.
- v1.0 (this release) — paste API key, embed widget. Page-context awareness handled by the widget itself.
- v1.1 — Gutenberg block + shortcode for inline chat embed
- v2.0 — Knowledge base sync via
save_posthook (KB sync infrastructure on the backend; this repo'ssrc/Hooks.phpalready has empty-but-wired listeners ready) - v3.0 — WooCommerce-aware (product sync, customer awareness, order status hooks)