| 开发者 | wcblogs87 |
|---|---|
| 更新时间 | 2026年5月12日 13:19 |
| PHP版本: | 7.4 及以上 |
| WordPress版本: | 6.7 |
| 版权: | GPLv2 or later |
| 版权网址: | 版权信息 |
wc_reduce_stock_levels() — safe under concurrent loadprefers-reduced-motion, high-contrast modewp plugin activate works correctly!important button rules from popular themes without breaking other site styles.
Technical Highlights
random_bytes()wc_orders_meta and postmeta)wp_cache_flush() abuse — targeted cache invalidation onlywc_get_logger() integration for production debugging+8801719937625)No. The plugin uses the free wa.me deep-link protocol. No API keys, no business verification, no per-message fees.
A real WooCommerce order is created and stock is reduced via WooCommerce's built-in wc_reduce_stock_levels(). This is atomic and safe under concurrent customer load.
Yes. On shop archive pages, variable products redirect the customer to the single product page so they can select size, color, etc. On single product pages, the WhatsApp button is only enabled once a valid variation is selected.
The shadow order remains in your WooCommerce dashboard with the status you configured (default: On Hold). You can follow up with the customer or cancel the order — cancelling automatically restores stock.
No. The plugin suppresses all WooCommerce transactional emails during shadow order creation. The customer and admin only receive emails when an order is processed through the normal checkout flow.
mail() is disabled?Yes. Because the plugin suppresses all email hooks during shadow order creation, mail() is never called. No PHPMailer errors regardless of server configuration.
Yes. The plugin declares HPOS compatibility and uses only HPOS-safe APIs (no direct postmeta access on orders).
Yes. The plugin declares cart_checkout_blocks compatibility and doesn't interfere with the Block-based checkout flow.
Yes. Use placeholders like {product_name}, {order_id}, {quantity}, {total}, {variations}, and {date} in the message template setting.
Yes. The plugin includes a Button Style section with color pickers, padding, border radius, font size, icon size, and a custom icon uploader.
Yes. The plugin is fully internationalized and ready for translation via WordPress.org's Translate platform or .po/.mo files in /languages.
Yes. Activation, deactivation, and uninstall all handle multisite correctly. Each site has its own settings.
Yes. The plugin supports keyboard navigation, ARIA attributes (aria-busy, aria-label, role="alert"), prefers-reduced-motion, and Windows High Contrast Mode.
No external data is transmitted. The plugin only stores order data locally in your WooCommerce database, which you control. Customer IP address and user agent are stored on the order for fraud prevention (a standard WooCommerce practice).
match expressions, mixed type hint, int|WP_Error union return types, : never return type, str_contains(), and declare(strict_types=1) from all files. Plugin now requires PHP 7.4+ which matches the declared header.is_product_archive() fatal error — this function does not exist in WooCommerce. Replaced with is_woocommerce() plus standard archive checks.'replace_add_to_cart' button position breaking variable products by removing the entire add-to-cart template (including variation dropdowns). Now uses CSS-based hiding that preserves variation selection.woocommerce_is_sold_individually filter being applied globally, affecting all products on the site. Removed entirely.update_status() threw an exception. Wrapped in try/finally to guarantee filter restoration.ariksac_honeypot_field and ariksac_ajax_pre_check filters for reCAPTCHA/hCaptcha integration.ariksac_trust_proxy_headers filter (default false) — REMOTE_ADDR is now the authoritative IP source. Prevents X-Forwarded-For spoofing of rate limits and order IP records.wc_get_order_statuses()).wp_kses_post to sanitize_textarea_field — WhatsApp messages should be plain text.wp_die(-1) from check_ajax_referer with proper JSON 403 response.aria-busy toggle during loading state for screen reader accessibility..woocommerce-notices-wrapper.aria-busy state check.box-sizing: border-box to prevent padding overflow in strict themes.prefers-reduced-motion media query for spinner animation.forced-colors: active) support.aria-live regions for notices._ariksac_order_source = 'whatsapp' meta for filtering in admin.{date} placeholder for message templates.ariksac_message_placeholders filter for custom placeholders.wc_price() output cleaning — currency symbols and now display correctly in WhatsApp messages.wc_orders_meta and legacy postmeta regardless of current mode.wp_cache_flush() with targeted wp_cache_delete() — no longer impacts other plugins' Redis/Memcached cache.wp_color_picker palette support in admin.update_meta_data() warning on _customer_ip_address and _customer_user_agent. Replaced with proper WC setter methods.!important rules. Added high-specificity selector list.