| 开发者 | emtiazzahid |
|---|---|
| 更新时间 | 2026年10月14日 16:14 |
| PHP版本: | 7.4 及以上 |
| WordPress版本: | 7.1 |
| 版权: | GPLv2 or later |
| 版权网址: | 版权信息 |
repeatwright_coupon_email_limit filter changes it.mailchimp_woocommerce_is_subscribed (written by Mailchimp for WooCommerce), from the keys _wc_marketing_optin and marketing_optin (WooCommerce itself does not write them; a checkout field plugin or custom code can) or, when none of those keys is set on the order, from the repeatwright_order_optin filter. Required by default when the store's base country is in the EEA (the EU plus Iceland, Liechtenstein and Norway), the United Kingdom or Switzerland.repeatwright_order_amount, repeatwright_count_order, repeatwright_counted_statuses, repeatwright_order_source, repeatwright_order_optin, repeatwright_segment_key, repeatwright_segment_fields, repeatwright_segment_rules, repeatwright_merge_tags, repeatwright_email_allowed, repeatwright_capability, repeatwright_ltv_buckets, repeatwright_coupon_email_limit, repeatwright_batch_time_budget.
Actions: repeatwright_stats_computed, repeatwright_customer_updated, repeatwright_segment_entered, repeatwright_segment_left, repeatwright_email_sent, repeatwright_unsubscribed.
Helper: repeatwright_customer_segment( $email_or_user_id ).
WP-CLI: wp repeatwright recalc run|status|cancel, wp repeatwright segments list|refresh, wp repeatwright export --segment=<id> --file=<name>.csv (the file is written to the repeatwright folder in uploads, with a random suffix added to the name).
REST: repeatwright/v1 (overview, customers, segments, cohorts, emails, settings).
More plugins by Emtiaz Zahid
/wp-content/plugins/ or install it from the Plugins screen, then activate it.No. Orders are aggregated inside your own database and emails go out through WooCommerce's mail transport. There are no external API calls.
By default orders with the Completed and Processing statuses. Spend is always net of refunds; fully refunded orders count as an order with zero spend unless you turn that off. When WooCommerce Subscriptions is active, its renewal orders are counted too unless you turn off "Count subscription renewal orders" under Settings → Data. Change statuses, excluded roles and excluded emails under Settings → Data (an entry such as @example.com excludes every address at that domain), or use the repeatwright_counted_statuses filter.
Recency, frequency and monetary value are each scored 1–5. By default the cut points are quintiles of your customer base within the recency window (730 days), so scores are relative to your own store. Switch to fixed thresholds under Settings → RFM. Customers with no order inside the window are Lost.
Yes. By default guest orders are merged with a registered account when the billing email matches. Turn "Merge guest orders with registered accounts" off under Settings → Data to keep them apart: a registered customer's stats then come only from the orders placed with their account (under the account's email address), guest orders stay separate customers, and a guest order placed with the email address of a registered account is not counted, because that address already belongs to the account. Run a recalculation after changing the setting.
Yes. Repeatwright declares HPOS compatibility and loads orders with wc_get_orders(). The full recalculation pages through order IDs with one query on whichever orders table is active.
Once the first full recalculation has completed, a nightly job rescores every customer and refreshes segments and cohorts, and a customer's summary is also refreshed when one of their orders is created, changes status, is refunded, trashed, restored or deleted: the update is queued about 30 seconds after the change and processed on the next Action Scheduler run (WP-Cron). Nothing is updated this way before the first full recalculation has completed. Changes made while a full recalculation is running, the first one included, are held back and applied when it finishes or is cancelled.
Yes. repeatwright_customer_segment( $email_or_user_id ) returns the segment key, and every segment can be exported as CSV or turned into a WooCommerce coupon with email restrictions. repeatwright_segment_entered / repeatwright_segment_left fire for the customers who joined or left a segment when its membership is refreshed: nightly, after a full recalculation, when the segment is saved, when you click Refresh or with wp repeatwright segments refresh. They do not fire instantly when an order comes in.
No. Repeatwright has no server of its own, sends no usage statistics or telemetry, and makes no outbound requests at all. Segments, scores and reports are calculated from your WooCommerce orders on your own server, and segment emails are sent through WordPress and WooCommerce's own mailer.
No. Repeatwright uses the Action Scheduler that ships with WooCommerce for its background jobs (recalculation batches, order updates and email batches). It does not include a copy of its own.
The admin screen is a React app. Its readable source is in assets/src/admin/; assets/build/admin.js is the compiled bundle produced by @wordpress/scripts from package.json and webpack.config.js. Rebuild it with npm ci && npm run build inside the plugin directory.