| 开发者 | torod |
|---|---|
| 更新时间 | 2026年11月26日 05:57 |
| PHP版本: | 7.4 及以上 |
| WordPress版本: | 7.2 |
| 版权: | GPLv2 or later |
| 版权网址: | 版权信息 |
[sacp_zatca_qr] shortcode or the sacp_zatca_qr action. The settings screen tells you when an active invoice plugin doesn't include the QR yet.[sacp_otp_login] for a custom sign-in page._billing_vat_number). Off by default: turn it on under SA Commerce Pro › ZATCA QR code › Business customers. It stays off when another VAT plugin (EU VAT Number, EU VAT Assistant, Germanized Pro) already adds one.
Phone-first checkout (optional)
A checkout that starts with the mobile number and an SMS code; the email only if the customer wants one.
No. The short address field, the ZATCA QR code, email sign-in codes and the company VAT field work without one. An account is needed only for address lookup and SMS codes, which use credits.
It covers the Phase 1 (generation phase) QR code on simplified tax invoices. Phase 2 (integration with ZATCA's FATOORAH platform) needs more steps and will be offered as a separate service.
Paid orders (processing or completed) in Saudi riyals, paid on or after the "Add the QR to orders from" date, once you have entered your seller name and VAT number. The date is set to the day you first turn the QR code on; move it back to cover older orders. Stores that used the QR code before this setting existed keep it for all orders. An order that already has a QR always keeps it.
The QR is added automatically to "PDF Invoices & Packing Slips for WooCommerce" and "Print Invoice & Delivery Notes for WooCommerce". For any other invoice plugin or a custom template:
[sacp_zatca_qr] on the "Order received" or "View order" page, or [sacp_zatca_qr order_id="123"] elsewhere. Options: size="130" (pixels) and details="no" (QR only, without the invoice details). It shows only to staff who can edit orders, the order's own customer, or with the order key (key="…", or ?key= in the page address), so it never shows another customer's invoice.do_action( 'sacp_zatca_qr', $order, array( 'size' => 130, 'details' => true ) ); prints the same block (the template decides who sees the document). TorodCo\SACommercePro\Zatca\Zatca_Module::qr_data_uri( $order ) returns just the QR as a PNG data URI.Yes. The short address field, address lookup and the cash-on-delivery check work on the classic checkout and the Checkout block. The cash-on-delivery check also works on the "Pay for order" page. The phone-first checkout's mobile number step works on both; the optional or hidden email applies to the classic checkout only (the Checkout block always asks for an email).
For security, a mobile number signs in only after it is verified with a code. If the number is already saved as the billing phone of one customer account, the customer enters the SMS code and then a code sent to that account’s email, and the number is added to the account (SA Commerce Pro › Sign in with a code › “Customers whose number is already on an account”). You can choose “Password only” instead, or treat the number as new. A number saved on more than one account is never linked: those customers sign in with their email or password, then add the number in My Account › Account details.
Sign-in by SMS pauses; customers can still sign in with email codes or their password. Cash-on-delivery orders go through marked "not verified". A daily SMS limit protects your credits; when it is reached, you choose whether cash-on-delivery orders go through or shoppers choose another payment method.
Nothing until you choose a mode under SA Commerce Pro › Checkout experience. With it on, signed-out shoppers see a mobile number step before the checkout form, and new customers get an account (mobile number, first and last name) when they enter the code. Customers who give no email keep a stand-in address on their orders that is never mailed; they can add a real email later in My Account. If WooCommerce deletes inactive accounts (Accounts & Privacy), accounts created at that step without an order can be deleted after that period.
No. Administrators, shop managers and editors always use their password.
On the order as _billing_sacp_short_address / _shipping_sacp_short_address, and on the customer as billing_sacp_short_address / shipping_sacp_short_address. Block checkout orders also keep WooCommerce's own field _wc_billing/sa-commerce-pro/short-address.
Yes. The sign-in page from the shortcode is never cached, and if a cached page holds an expired security token the plugin fetches a fresh one. Its scripts are marked so LiteSpeed, WP Rocket, Perfmatters and Cloudflare Rocket Loader don't delay them. When a setting changes what the sign-in forms show, the plugin clears the page cache of LiteSpeed, WP Rocket, W3 Total Cache, WP Super Cache, SiteGround, Breeze and WP Fastest Cache. After updating the plugin, purge your cache once if your optimiser removes version numbers from script URLs.
Visitors behind Cloudflare are recognised automatically. For another proxy, add its IP or range with the sacp_trusted_proxies filter, so rate limits count each visitor separately.
Sign-in and sign-up:
sacp_signup_code_only (filter): keep WooCommerce's own register form on My Account (code-only off).sacp_code_signup_registration_checks (filter): run WooCommerce's registration checks for accounts created after a code (default yes).sacp_is_captcha_error (filter): which refusals count as CAPTCHA refusals (ignored after a verified code).sacp_email_signup_per_hour (filter): store-wide cap on email sign-up codes per hour (default 60).sacp_otp_limit_per_hour (filter): code requests per visitor per hour.sacp_otp_login_roles, sacp_otp_can_login, sacp_otp_before_sign_in (filters): who may sign in with a code alone, and a last refusal for security plugins.sacp_otp_tab_classes, sacp_primary_button_class (filters): reuse the theme's tab and button classes.sacp_phone_linked, sacp_phone_unlinked (actions): a verified mobile number was added to or removed from an account.sacp_cart_merge_notice (filter): turn off the "We added N items saved in your account" notice.
Checkout and cash on delivery:
sacp_phone_checkout_enforce (filter): refuse signed-out orders that skipped the phone-first checkout's mobile step.
sacp_checkout_email_gateways (filter): payment methods that need a real email.sacp_cod_payment_methods (filter): payment methods treated as cash on delivery.sacp_allow_guest_without_cart (filter): let guests use paid features with an empty cart (custom sign-in pages).
Address, ZATCA and connection:
sacp_lookup_limit_per_hour (filter): address lookups per visitor per hour.
sacp_zatca_qr_applies, sacp_zatca_email_image, sacp_zatca_unsupported_invoice_plugins (filters), sacp_zatca_qr (action and shortcode): the QR code on orders, emails and invoice templates.sacp_trusted_proxies, sacp_cloudflare_ranges (filters): proxies whose forwarded visitor IP is trusted.sacp_api_base_url, sacp_api_timeout, sacp_http_transport (filters): service address, timeout and transport (tests).sacp_webhook_plan (action): the plan changed through a signed webhook.sacp_purge_page_cache (action): fires when cached pages must be dropped; hook your page cache here if it isn't LiteSpeed, WP Rocket, W3 Total Cache, WP Super Cache, SiteGround, Breeze or WP Fastest Cache.sacp_debug_log (filter): debug logging.The connection belongs to the address it was made from. On a copy at another address (or another folder), address lookup and SMS codes stay off, so the copy never uses your credits or texts real customers. Connect the copy with its own site key to test them.
sacp_purge_page_cache action), and when WooCommerce's sign-up option or the active plugins change.[sacp_zatca_qr] shortcode and sacp_zatca_qr action.