Repeatwright turns your existing WooCommerce orders into customer intelligence. It groups every customer into one of eleven RFM segments (Champions, Loyal, At Risk, Can’t Lose, Lost …), shows your repeat purchase rate and average lifetime value, and plots cohort retention month by month. Everything is computed on your server from your orders. No data leaves your site.
Overview
Customers
repeatwright_coupon_email_limit filter changes it.Segments
Cohorts
Emails
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.Developers
Filters: 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).
Repeatwright stores, in your own database, a summary per customer built from your orders:
The summary is kept for as long as the plugin is installed and removed on uninstall unless “Keep customer stats, segments and emails when the plugin is uninstalled” is on under Settings Advanced. The per-recipient email log, and the recipient list of sent or cancelled emails, are deleted by the nightly job once they are older than the number of days set under Settings Consent (30 by default); the email’s subject, body and sent/skipped counts are kept. This plugin does not contact any external service; emails are sent through your site’s own mailer.
CSV exports contain names, email addresses and order statistics. Exports from the admin screen are downloaded by your browser and not stored on the server. wp repeatwright export --file=<name>.csv writes the file to the repeatwright folder inside your uploads directory, adding a random 16-character suffix to the name so it cannot be guessed, and places an index.php and a deny-all .htaccess in that folder (the .htaccess only works on Apache-style servers). The command prints the full path. Move or delete the file once you have it. Uninstalling the plugin deletes that folder unless that same setting is on.
The plugin registers a personal data exporter and eraser with the WordPress privacy tools (Tools Export / Erase Personal Data). The export contains the stored summary for that address (including staff notes, consent and unsubscribe state, acquisition source, currency, products, categories, coupons, RFM scores and active months), its segment memberships with the date each was entered, and its segment email log entries. Erasure anonymises the customer record, deletes its segment memberships and remembers the address (as a hash) so a later recalculation does not rebuild it. When WooCommerce removes the personal data from an order (an erasure request, the “Remove personal data” order action or its personal data retention settings), Repeatwright rebuilds that customer’s summary from their remaining orders and anonymises it when no counted order with that address is left. A suggested paragraph for your privacy policy is added under Settings Privacy Policy Guide.
Consent: segment emails only go to customers the store may contact. When “Require marketing opt-in” is on, the opt-in is read from the order meta key mailchimp_woocommerce_is_subscribed (written by Mailchimp for WooCommerce), from the keys _wc_marketing_optin and marketing_optin (WooCommerce itself has no opt-in field and does not write them; a checkout field plugin or custom code can) or, when none of those keys is set on the order, supplied through the repeatwright_order_optin filter. The setting is on by default when the store’s base country is in the EEA (the EU plus Iceland, Liechtenstein and Norway), the United Kingdom or Switzerland, off elsewhere, and can be changed under Settings Consent. Every email carries an unsubscribe link and List-Unsubscribe headers, and unsubscribed customers are never emailed again.