| 开发者 | codeatoz |
|---|---|
| 更新时间 | 2026年10月15日 20:49 |
| PHP版本: | 8.0 及以上 |
| WordPress版本: | 7.1 |
| 版权: | GPLv2 or later |
| 版权网址: | 版权信息 |
[wcwa_chat_button] shortcode, or as a block. This was listed as a free feature since 1.0 but had never actually been implemented — only the share button existed. It needs no Meta credentials, so it works on day one.wp_postmeta, but with High-Performance Order Storage enabled order meta lives in wp_wc_orders_meta, so customer phone numbers and consent flags survived uninstall. Both layouts are now cleaned.{{1}}, {{2}} placeholder to the order value it should receive, with a live preview. This eliminates Meta error #132000 ("number of parameters does not match"), which was by far the most common setup problem./notify-me and /verify-otp were registered publicly on every free install but called classes that ship only in Pro, so any request to them produced an HTTP 500 and an error-log entry.{{1}}, {{2}} placeholder#132000, the most common cause of messages failing to send[wcwa_chat_button] shortcode, or as a block (works in full-site-editing templates)wa.me link, so it works before you connect the Cloud API{product}, {product_url}, {store} and {page_url}wp-config.php constantwp-content/plugins/Meta bills per message (it moved away from the old per-conversation model on 1 July 2025). Rates depend on the message category and the recipient's country:
Only if you first delete WhatsApp Personal or WhatsApp Business from the device. A phone number can only be registered to ONE of: WhatsApp Personal, WhatsApp Business app, or WhatsApp Cloud API. This plugin uses Cloud API, so you'll need to migrate the number off WhatsApp Personal/Business first. If you want to keep your personal WhatsApp running, get a separate business number (a VOIP number, a second SIM, or a landline that can receive SMS or voice for verification will work).
Brand-new WhatsApp Business numbers start on Meta's lowest messaging tier — typically 250 unique customers per 24 hours. As long as your quality rating stays "High" in Meta's assessment, Meta automatically promotes you through progressively higher tiers (1,000, then 10,000, then 100,000, then unlimited). The progression usually takes 2–4 weeks of healthy sending. Send transactional (Utility) templates first — they build trust fastest with Meta's quality system, because customers expect them and rarely block or report them. Meta adjusts these tier thresholds from time to time; your current limit and quality rating are shown in the Meta Business Manager for your phone number.
The most common rejection reasons:
order_shipped_v2).
Go to Settings → Notifications. For each order event, pick the Meta-approved template you want from the dropdown, then click "Map template variables". The plugin reads that template's structure from Meta and shows one dropdown per {{1}}, {{2}} placeholder — choose which order value belongs in each, and check the live preview underneath.
You only need to do this once per template. Templates you leave unmapped keep behaving exactly as they did before 1.5.0, where the plugin guessed the variable order from a fixed priority list.
If the dropdown is empty, connect your Meta credentials first, then use Refresh from Meta on the Templates screen.
Visit WhatsApp Commerce → Message Log and find the most recent message to that customer. The status column tells you exactly what happened:
#131026 (number not on WhatsApp), #132000 (template parameter mismatch), #132001 (template language mismatch).Yes. The opt-in checkbox renders on both classic checkout and the new Blocks Checkout. We update it as WooCommerce updates the Blocks API.
Yes. HPOS compatibility is declared in the plugin header and tested against the latest WooCommerce versions.
Yes. The .pot file is included in /languages/, plus sample .po files for German, French, Spanish, Italian, Dutch, Portuguese, Polish, Swedish, and Danish. Translations are loaded on the init hook with priority 5 so other modules can use translated strings safely.
The access token is encrypted using OpenSSL AES-256-CBC before being written to the wp_options table. The encryption key is derived from your WordPress AUTH_KEY constant. The token is decrypted only at the moment of an outbound API request to Meta. If you back up your database and accidentally expose it, the token cannot be used without your WordPress secret keys.
The free version focuses on transactional notifications (order updates, opt-in confirmations, click-to-chat). For bulk marketing campaigns, segmented broadcasts, or abandoned cart recovery, the Pro version on codeatoz.com adds those features. The free version does not include broadcast functionality.
wa.me deep link with your business number and an optional pre-filled message. Configurable number, button text, message and position; placeable automatically on product pages, via the [wcwa_chat_button] shortcode, or as a block that works in full-site-editing templates. The pre-filled message supports {product}, {product_url}, {store} and {page_url} — deliberately a small set, since the text travels in a URL the customer can read. Needs no Meta credentials, approved template or opt-in. New settings tab: Settings → Chat Button.
Note: a click-to-chat button has been listed in this readme as a free feature since 1.0, but was never actually implemented — only the share button existed. This release ships it.wp_postmeta, but with High-Performance Order Storage enabled WooCommerce stores order meta in wp_wc_orders_meta. Phone numbers and consent flags therefore survived uninstall on HPOS sites. Both table layouts are now cleaned, guarded by a table-existence check since WooCommerce may already be deactivated at uninstall time.add_query_arg() URL-encodes values itself, so pre-encoding produced %2520 for a space and the customer would have seen a literal "%20" in their chat box. Caught before release by a regression test.{{1}}/{{2}} placeholder to a specific order value, with a live preview. Covers text headers and dynamic URL buttons as well as the message body. Unmapped templates keep their previous behaviour, so the upgrade changes nothing until you opt in per template. This is the fix for Meta error #132000.wcwa_account_endpoint_slug.woocommerce_register_additional_checkout_field() (WooCommerce 8.9+), so it also surfaces in My Account and on the admin order screen. _wcwa_whatsapp_optin remains the canonical meta key and is written on every path, so existing orders, subscriber records and the Pro add-on are unaffected. Falls back to the previous Store API integration on older WooCommerce, or if you disable optin_use_wc_fields.wc_get_order_statuses(), so statuses registered by plugins like WooCommerce Order Status Manager appear in the settings UI. Filterable via wcwa_order_notification_events.notify_order_confirmed, but a pending order fires a status change to pending, so the dispatcher looked up notify_order_pending and never found a match. No WooCommerce status is called confirmed. Existing configuration is migrated automatically on update, and the old key is still honoured if you never re-save your settings.POST /wp-json/wce-whatsapp/v1/notify-me and POST /wp-json/wce-whatsapp/v1/verify-otp were registered unconditionally with a public permission callback, but their handlers call Back_In_Stock_Model and OTP_Generator — classes that exist only in the Pro add-on. Any unauthenticated request returned an HTTP 500 and wrote a fatal error to the PHP log. Both routes are now registered only when their backing classes are present.Admin_Menu::render_pro_banner() included a partial that had never been added to the plugin, making it a silent no-op since 1.0.module_whatsapp_login was enabled on a free install — the referenced Login_Form class only exists in the Pro build and was called without a guard.define( 'WCWA_WHATSAPP_API_VERSION', 'v26.0' ); in wp-config.php if you need a different version.Tested up to: 7.0.assets/js/vendor/ (MIT license attribution included)$_GET / $_POST reads wrapped with wp_unslash() before sanitization$wpdb queries use prepare() or have appropriate phpcs:ignore documentationesc_attr() / wp_kses_post()<script> extracted to enqueued admin-help.jsbase64_decode calls commented with security justification