WP Weixin - WordPress WeChat integration
Table of Contents
General Description
WP Weixin provides integration between WordPress and WeChat. Register or authenticate users automatically in WeChat browser, use WeChat to create an account or authenticate on computers by scanning a QR code with WeChat, share posts in WeChat Moments and conversations or extend the plugin for more features!
Companion Plugins
Developers are encouraged to build plugins and themes integrated with WeChat with WP Weixin as a core, leveraging its publicly available functions, actions and filters, or directly make use of the provided SDK.
If you wish to see your plugin added to this list, please contact the author.
Important Notes
- Requires a China Mainland WeChat Official Account (Subscription or Service - Service is required if used with companion plugins dealing with payments).
- A domain used by WordPress must be registered in an Official Account's backend
- The plugin itself does not require programming knowledge, and provides really useful functionalities out of the box. Where it really shines though is when used by developers to extend its functionalities (mainly through the pre-initialised JS SDK, the WeChat Responder, and various provided functions, actions and filters).
Registering a domain in the Official Account's backend
To register a domain and authorize communication between it and the WeChat APIs (frontend JS and server side), the domain must be linked with an ICP license first. Then, on https://mp.weixin.qq.com:
- connect to the Official Account's backend
- click the "Interface Privilege" menu item
- in the list, search for "Web Page Authorization" and click the "Modify" link
- add the domain in both "JS interface security domain name" and "Webpage authorization domain name" by clicking the "Set-up" link for both sections (without the protocol
http or https) - making sure to include the MP_verify_[some_code].txt files to the root of the website corresponding to the domain registered as instructed, accessible publicly.
Overview
This plugin adds the following major features to WordPress:
- WP Weixin settings page: configure the plugin with an Official Account (or as many as you want in multisite) in English or Chinese out of the box, with instructions for each option.
- WeChat Authentication: automatically create and authenticate users in WordPress in the WeChat browser, or allow users to scan a QR code with WeChat when using classic browsers (social login).
- WeChat Account Binding: let users bind/unbind their existing WordPress account with their WeChat account. Integrated with WooCommerce and Ultimate Member account pages, and may be integrated with any membership/account/profile plugin easily.
- WeChat Share: Share posts and pages on Moments or Send to chat, in a pretty way. Triggers JavaScript events for developers on success and failure.
- Force WeChat mobile: to prevent users from browsing the website outside of the WeChat browser. If accessed with a classic browser, the page displays a QR code.
- Force following the Official Account: to harvest WeChat followers, forcing users to follow the Official Account before accessing the content.
- WordPress Users screen override: to display WeChat names and WeChat avatars if they exist, instead of the default values in the user screen.
- WP Weixin QR code generator: to create custom codes.
- Menu integration: allows to set the Official Account menus in WordPress when the WeChat Responder is enabled.
- Welcome message: sends a welcome message in WeChat when a user follows the Official Account ; allows to do so with WordPress when the WeChat Responder is enabled.
- Developers - WeChat Responder: for developers to receive and respond to calls made by WeChat's API.
- Developers - WeChat JS_SDK: the
wx JavaScript global variable is pre-configured with a signed package to leverage the JavaScript SDK of WeChat in WordPress themes more easily.
Compatible with WooCommerce, WooCommerce Multilingual, WPML, Ultimate Member, WordPress Multisite, and many caching plugins.
Object Cache considerations
This plugi