Linux 软件免费装
Banner图

Sahand - Unpaid Order SMS for WooCommerce

开发者 sahandz
更新时间 2026年11月24日 21:50
PHP版本: 7.4 及以上
WordPress版本: 7.1
版权: GPLv2 or later
版权网址: 版权信息

标签

email woocommerce abandoned cart sms unpaid orders

下载

1.3.1 1.1.0 1.2.0

详情介绍:

Bring customers back to unpaid WooCommerce orders worldwide with SMS and email. Choose SMS, email, or both independently for customers and shop managers. Connect Twilio, any HTTP SMS API, the WP SMS plugin, another plugin through a developer hook, or Kavenegar for Iran. Email uses WordPress wp_mail, so it works with your SMTP or mail plugin. How it works SMS gateways and email International phone numbers support + and 00 prefixes, Persian/Arabic digits, and a configurable default country code (98). New SMS gateways use E.164; Kavenegar retains Iranian mobile formatting. Translation ready, with Persian translation sources included in the project. Compatible with WooCommerce High-Performance Order Storage (HPOS).

安装:

  1. Upload the plugin and activate it (WooCommerce must be active).
  2. Go to WooCommerce > Unpaid Order SMS.
  3. Choose your SMS gateway and enter its credentials, or enable email. Set the default country code and each recipient's channels. Existing SMS switches are preserved on upgrade; email starts disabled.
  4. Customize customer and manager messages using the same placeholders for SMS, email subjects and email bodies. Kavenegar users can also set approved patterns and tokens.
  5. Enter a test phone/email and use the test button for the recipient. Review the log, then tick "Enable".
Example Kavenegar template for the customer (tokens: token = {order_id}, token2 = {coupon}, token3 = {link_code}, token10 = {first_name}): %token10 عزیز، سفارش %token شما پرداخت نشد. کد تخفیف شما: %token2 تکمیل خرید: example.com/?suos=%token3

屏幕截图:

  • The customer and shop manager messages: SMS text (or an SMS pattern), email subject and body, and a test button.
  • The log of sent messages.

常见问题:

How do I set up a Kavenegar pattern?

Write the SMS text, check the token mapping, and save. Under the tokens you will find "Ready-made pattern text": press Copy, create a pattern with exactly this text in the Kavenegar panel and wait for its approval. Then enter the pattern name and save. The checkout link is already written as yoursite.com/?suos=%token3 when {link_code} is in token3. If a placeholder is not in any token, the plugin tells you which one.

How do I connect any HTTP SMS provider?

Choose "Custom HTTP API (any provider)" and copy the endpoint and authentication details from your provider's API documentation. Enter one key=value parameter per line, for example: apikey=YOUR_KEY to={to} text={message} {to} is E.164 (for example +989120000000); {to_local} is the national form with a leading 0, based on your default country code. Parameters are substituted after parsing, then URL-encoded for GET/form or JSON-encoded without URL encoding for JSON. Optional headers use one Name: value per line. HTTP 2xx counts as success; set "Success text" if your provider also requires a specific response marker. The form supports flat key/value APIs; use the developer hook for APIs requiring nested payloads, signatures or another protocol.

How do I connect another SMS plugin with a hook?

Select "Another plugin (developer hook)". Add the following five-line example to your integration plugin, replacing my_sms_plugin_send with its actual send function and adapting its success result: add_filter( 'sahand_uos_send_sms', function ( $result, $to, $text, $context ) { if ( ! function_exists( 'my_sms_plugin_send' ) ) { return $result; } $sent = my_sms_plugin_send( $to, $text ); return true === $sent; }, 10, 4 ); The context contains order_id and recipient (customer/admin; test-customer/test-admin with order_id 0 for tests). Return true or an array with a truthy ok key for success. A null result means no plugin handled the filter. Only Kavenegar sends pre-approved patterns; the test gateway can preview them without sending.

Can I send only email?

Yes. Disable SMS and enable email independently for each recipient. Customer email uses the order's billing email and is skipped when invalid. Manager addresses are entered separately. Email uses the WooCommerce wrapper and wp_mail, so your SMTP/mail plugin handles delivery. A successful log means the transport accepted the message; it does not guarantee inbox delivery.

My site uses page cache

Leave "Keep messages on time on cached sites" enabled in WooCommerce > Unpaid Order SMS, then clear your page cache so cached pages include the small browser tick. It runs due rescue checks during visits even when a full-page cache serves the page. Visitors must allow JavaScript and local storage; no visits means no browser ticks. For reliable timing even without visitors, configure a real server cron to call wp-cron.php every 5 minutes, then add define('DISABLE_WP_CRON', true); to wp-config.php. The plugin shows a notice with your site's cron example if a check runs more than 15 minutes late.

Why are spaces in some tokens replaced with "_"?

Kavenegar accepts only one word in token, token2 and token3 (no spaces or half-spaces; it answers error 431). Put names and amounts in token10 or token20, which may contain spaces.

What if my delay is longer than WooCommerce's "Hold stock" time?

The order is cancelled first; the message is still sent, and the link rebuilds the cart.

更新日志:

1.3.1 1.3.0 1.2.0 1.1.0 1.0.0