{"id":385288,"date":"2026-10-13T10:10:19","date_gmt":"2026-10-13T10:10:19","guid":{"rendered":"https:\/\/wordpress.org\/plugins\/repeatwright-customer-segments-rfm-retention-for-woocommerce\/"},"modified":"2026-10-13T10:22:07","modified_gmt":"2026-10-13T10:22:07","slug":"repeatwright","status":"publish","type":"plugin","link":"https:\/\/wordpress.org\/plugins\/repeatwright\/","author":17599152,"comment_status":"closed","ping_status":"closed","template":"","meta":{"version":"1.0.0","stable_tag":"1.0.0","tested":"7.1.3","requires":"6.6","requires_php":"7.4","requires_plugins":null,"header_name":"Repeatwright \u2013 Customer Segments, RFM & Retention for WooCommerce","header_author":"Emtiaz Zahid","header_description":"Customer segments, RFM scores, repeat rate, LTV and cohort retention for WooCommerce, with segment export and one-off emails. Your data stays on your server.","assets_banners_color":"8d6c80","last_updated":"2026-10-13 10:22:07","external_support_url":"","external_repository_url":"","donate_link":"","header_plugin_uri":"https:\/\/emtiazzahid.github.io\/plugins\/repeatwright\/","header_author_uri":"https:\/\/github.com\/emtiazzahid","rating":0,"author_block_rating":0,"active_installs":0,"downloads":34,"num_ratings":0,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","faq","changelog"],"tags":{"1.0.0":{"tag":"1.0.0","author":"emtiazzahid","date":"2026-10-13 10:22:07","revision":3743548}},"upgrade_notice":{"1.0.0":"<p>Initial release.<\/p>"},"ratings":[],"assets_icons":{"icon-256x256.png":{"filename":"icon-256x256.png","revision":3743528,"resolution":"256x256","location":"assets","locale":"","width":256,"height":256},"icon.svg":{"filename":"icon.svg","revision":3743528,"resolution":false,"location":"assets","locale":false}},"assets_banners":{"banner-1544x500.png":{"filename":"banner-1544x500.png","revision":3743528,"resolution":"1544x500","location":"assets","locale":"","width":1544,"height":500},"banner-772x250.png":{"filename":"banner-772x250.png","revision":3743528,"resolution":"772x250","location":"assets","locale":"","width":772,"height":250}},"assets_blueprints":{},"all_blocks":[],"tagged_versions":["1.0.0"],"block_files":[],"assets_screenshots":{"screenshot-1.png":{"filename":"screenshot-1.png","revision":3743528,"resolution":"1","location":"assets","locale":"","width":2560,"height":1600},"screenshot-2.png":{"filename":"screenshot-2.png","revision":3743528,"resolution":"2","location":"assets","locale":"","width":2560,"height":1600},"screenshot-3.png":{"filename":"screenshot-3.png","revision":3743528,"resolution":"3","location":"assets","locale":"","width":2560,"height":1600},"screenshot-4.png":{"filename":"screenshot-4.png","revision":3743528,"resolution":"4","location":"assets","locale":"","width":2560,"height":1600},"screenshot-5.png":{"filename":"screenshot-5.png","revision":3743528,"resolution":"5","location":"assets","locale":"","width":2560,"height":1600},"screenshot-6.png":{"filename":"screenshot-6.png","revision":3743528,"resolution":"6","location":"assets","locale":"","width":2560,"height":1600}},"screenshots":{"1":"Overview with KPIs and the RFM segment grid.","2":"Customers list with filters and bulk actions.","3":"Segment builder with live count.","4":"Cohort retention heatmap.","5":"Customer drawer with order timeline and RFM explanation.","6":"Segment email composer with merge tags and consent summary."}},"plugin_section":[],"plugin_tags":[286382,140847,23979,264073,286],"plugin_category":[45],"plugin_contributors":[191403],"plugin_business_model":[],"class_list":["post-385288","plugin","type-plugin","status-publish","hentry","plugin_tags-customer-lifetime-value","plugin_tags-customer-segmentation","plugin_tags-retention","plugin_tags-rfm","plugin_tags-woocommerce","plugin_category-ecommerce","plugin_contributors-emtiazzahid","plugin_committers-emtiazzahid"],"banners":{"banner":"https:\/\/ps.w.org\/repeatwright\/assets\/banner-772x250.png?rev=3743528","banner_2x":"https:\/\/ps.w.org\/repeatwright\/assets\/banner-1544x500.png?rev=3743528","banner_rtl":false,"banner_2x_rtl":false},"icons":{"svg":"https:\/\/ps.w.org\/repeatwright\/assets\/icon.svg?rev=3743528","icon":"https:\/\/ps.w.org\/repeatwright\/assets\/icon.svg?rev=3743528","icon_2x":false,"generated":false},"screenshots":[{"src":"https:\/\/ps.w.org\/repeatwright\/assets\/screenshot-1.png?rev=3743528","caption":"Overview with KPIs and the RFM segment grid."},{"src":"https:\/\/ps.w.org\/repeatwright\/assets\/screenshot-2.png?rev=3743528","caption":"Customers list with filters and bulk actions."},{"src":"https:\/\/ps.w.org\/repeatwright\/assets\/screenshot-3.png?rev=3743528","caption":"Segment builder with live count."},{"src":"https:\/\/ps.w.org\/repeatwright\/assets\/screenshot-4.png?rev=3743528","caption":"Cohort retention heatmap."},{"src":"https:\/\/ps.w.org\/repeatwright\/assets\/screenshot-5.png?rev=3743528","caption":"Customer drawer with order timeline and RFM explanation."},{"src":"https:\/\/ps.w.org\/repeatwright\/assets\/screenshot-6.png?rev=3743528","caption":"Segment email composer with merge tags and consent summary."}],"raw_content":"<!--section=description-->\n<p>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 \u2026), 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.<\/p>\n\n<p><strong>Overview<\/strong><\/p>\n\n<ul>\n<li>Customers, repeat rate, average lifetime value, orders per customer, median days between orders and 90\u2011day active customers. When the repeat rate counts only customers whose first order falls inside the selected range (the default), it is also compared with the previous period of the same length.<\/li>\n<li>RFM grid with customer count, revenue and share per segment. Click a tile to see the customers.<\/li>\n<li>Lifetime value distribution, new vs returning revenue by month and your top customers.<\/li>\n<\/ul>\n\n<p><strong>Customers<\/strong><\/p>\n\n<ul>\n<li>Filter by segment, spend, orders, last order date, country, acquisition source, tag, product, category or coupon.<\/li>\n<li>Bulk export to CSV (the selected rows, or every customer matching the filter), copy emails, add tags, or create a WooCommerce coupon restricted to those customers' email addresses. Repeatwright adds at most 500 addresses to one coupon; this is Repeatwright's own limit and the <code>repeatwright_coupon_email_limit<\/code> filter changes it.<\/li>\n<li>Customer drawer with the order timeline, RFM explanation, top products, tags, notes, consent state and unsubscribe toggle.<\/li>\n<li>Segment badge in the WordPress users list and a customer summary box on every order.<\/li>\n<\/ul>\n\n<p><strong>Segments<\/strong><\/p>\n\n<ul>\n<li>Visual rule builder with AND \/ OR groups: spend, orders, recency, first order, average order, country, source, tags, products bought, categories bought, coupons used, RFM segment, marketing opt\u2011in and, when WooCommerce Subscriptions is active, whether the customer has an active subscription.<\/li>\n<li>Live count while you edit. Membership is refreshed nightly, after a full recalculation, when a segment is saved and when you click Refresh.<\/li>\n<li>Export, copy emails, coupon or email any segment.<\/li>\n<\/ul>\n\n<p><strong>Cohorts<\/strong><\/p>\n\n<ul>\n<li>Retention heatmap by month of first order; toggle between percentage, customers and revenue.<\/li>\n<\/ul>\n\n<p><strong>Emails<\/strong><\/p>\n\n<ul>\n<li>Send a message to any segment through WooCommerce's own email template with merge tags ({first_name}, {coupon_code}, {orders}, {total_spent} \u2026).<\/li>\n<li>Test send, schedule for a date and time in the site timezone, throttled batches through Action Scheduler (one batch per minute until everyone is sent), a per\u2011recipient log (the screen shows the latest 200 entries) and an automatic unsubscribe link.<\/li>\n<li>Consent gate: when opt\u2011in is required, only customers whose orders carry a marketing opt\u2011in receive emails. The opt\u2011in is read from the order meta key <code>mailchimp_woocommerce_is_subscribed<\/code> (written by Mailchimp for WooCommerce), from the keys <code>_wc_marketing_optin<\/code> and <code>marketing_optin<\/code> (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 <code>repeatwright_order_optin<\/code> 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.<\/li>\n<\/ul>\n\n<p><strong>Developers<\/strong><\/p>\n\n<p>Filters: <code>repeatwright_order_amount<\/code>, <code>repeatwright_count_order<\/code>, <code>repeatwright_counted_statuses<\/code>, <code>repeatwright_order_source<\/code>, <code>repeatwright_order_optin<\/code>, <code>repeatwright_segment_key<\/code>, <code>repeatwright_segment_fields<\/code>, <code>repeatwright_segment_rules<\/code>, <code>repeatwright_merge_tags<\/code>, <code>repeatwright_email_allowed<\/code>, <code>repeatwright_capability<\/code>, <code>repeatwright_ltv_buckets<\/code>, <code>repeatwright_coupon_email_limit<\/code>, <code>repeatwright_batch_time_budget<\/code>.\nActions: <code>repeatwright_stats_computed<\/code>, <code>repeatwright_customer_updated<\/code>, <code>repeatwright_segment_entered<\/code>, <code>repeatwright_segment_left<\/code>, <code>repeatwright_email_sent<\/code>, <code>repeatwright_unsubscribed<\/code>.\nHelper: <code>repeatwright_customer_segment( $email_or_user_id )<\/code>.\nWP-CLI: <code>wp repeatwright recalc run|status|cancel<\/code>, <code>wp repeatwright segments list|refresh<\/code>, <code>wp repeatwright export --segment=&lt;id&gt; --file=&lt;name&gt;.csv<\/code> (the file is written to the repeatwright folder in uploads, with a random suffix added to the name).\nREST: <code>repeatwright\/v1<\/code> (overview, customers, segments, cohorts, emails, settings).<\/p>\n\n<h4>More plugins by Emtiaz Zahid<\/h4>\n\n<ul>\n<li><a href=\"https:\/\/wordpress.org\/plugins\/launchmender\/\">Launchmender<\/a>: 44 pre-launch checks with one-click fixes, a manual checklist and a client handoff report<\/li>\n<li><a href=\"https:\/\/wordpress.org\/plugins\/faultwright\/\">Faultwright<\/a>: PHP errors, JavaScript errors, failed cron jobs, emails and updates on one timeline<\/li>\n<li><a href=\"https:\/\/wordpress.org\/plugins\/stalemender\/\">Stalemender<\/a>: content audit that gives every post a Freshness Score (0\u2013100) and tells you why<\/li>\n<li><a href=\"https:\/\/wordpress.org\/plugins\/waymender\/\">Waymender<\/a>: finds broken links without hammering your server, logs 404s and fixes both in one click<\/li>\n<li><a href=\"https:\/\/wordpress.org\/plugins\/anchormender\/\">Anchormender<\/a>: internal link suggestions while you write, an orphan post report and bulk internal linking<\/li>\n<\/ul>\n\n<h3>Privacy<\/h3>\n\n<p>Repeatwright stores, in your own database, a summary per customer built from your orders:<\/p>\n\n<ul>\n<li>Billing first name, last name, email address and country from the most recent order, and the linked WordPress user id.<\/li>\n<li>Order aggregates: number of orders and refunds, total spent, order currency, first and last order dates, average order value, the products, top product, top category and coupons bought and the months they were bought in, RFM scores and segment.<\/li>\n<li>The acquisition source: the UTM source (or source type) that WooCommerce order attribution recorded on the order.<\/li>\n<li>The marketing opt-in state read from the order, whether the customer has unsubscribed, and any tags and notes your staff add.<\/li>\n<li>Segment membership: which RFM and custom segments each customer belongs to and the date they entered each one.<\/li>\n<li>For segment emails: the list of customers each email was sent to and a per-recipient log (sent, failed or skipped, with the reason and time).<\/li>\n<\/ul>\n\n<p>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 \u2192 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 \u2192 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.<\/p>\n\n<p>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. <code>wp repeatwright export --file=&lt;name&gt;.csv<\/code> writes the file to the <code>repeatwright<\/code> 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.<\/p>\n\n<p>The plugin registers a personal data exporter and eraser with the WordPress privacy tools (Tools \u2192 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 \u2192 Privacy \u2192 Policy Guide.<\/p>\n\n<p>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 <code>mailchimp_woocommerce_is_subscribed<\/code> (written by Mailchimp for WooCommerce), from the keys <code>_wc_marketing_optin<\/code> and <code>marketing_optin<\/code> (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 <code>repeatwright_order_optin<\/code> 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 \u2192 Consent. Every email carries an unsubscribe link and List-Unsubscribe headers, and unsubscribed customers are never emailed again.<\/p>\n\n<!--section=installation-->\n<ol>\n<li>Install and activate WooCommerce 9.0 or newer.<\/li>\n<li>Upload the plugin folder to <code>\/wp-content\/plugins\/<\/code> or install it from the Plugins screen, then activate it.<\/li>\n<li>Go to WooCommerce \u2192 Customer Insights and click <strong>Start<\/strong> to build the first set of customer stats. Large stores are processed in batches in the background.<\/li>\n<li>Optionally review Settings \u2192 Data (counted statuses, excluded roles) and Settings \u2192 Consent.<\/li>\n<\/ol>\n\n<!--section=faq-->\n<dl>\n<dt id=\"does%20repeatwright%20send%20my%20data%20anywhere%3F\"><h3>Does Repeatwright send my data anywhere?<\/h3><\/dt>\n<dd><p>No. Orders are aggregated inside your own database and emails go out through WooCommerce's mail transport. There are no external API calls.<\/p><\/dd>\n<dt id=\"which%20orders%20are%20counted%3F\"><h3>Which orders are counted?<\/h3><\/dt>\n<dd><p>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 \u2192 Data. Change statuses, excluded roles and excluded emails under Settings \u2192 Data (an entry such as <code>@example.com<\/code> excludes every address at that domain), or use the <code>repeatwright_counted_statuses<\/code> filter.<\/p><\/dd>\n<dt id=\"how%20are%20rfm%20scores%20computed%3F\"><h3>How are RFM scores computed?<\/h3><\/dt>\n<dd><p>Recency, frequency and monetary value are each scored 1\u20135. 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 \u2192 RFM. Customers with no order inside the window are Lost.<\/p><\/dd>\n<dt id=\"are%20guest%20orders%20included%3F\"><h3>Are guest orders included?<\/h3><\/dt>\n<dd><p>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 \u2192 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.<\/p><\/dd>\n<dt id=\"does%20it%20work%20with%20high-performance%20order%20storage%20%28hpos%29%3F\"><h3>Does it work with High-Performance Order Storage (HPOS)?<\/h3><\/dt>\n<dd><p>Yes. Repeatwright declares HPOS compatibility and loads orders with <code>wc_get_orders()<\/code>. The full recalculation pages through order IDs with one query on whichever orders table is active.<\/p><\/dd>\n<dt id=\"how%20does%20it%20stay%20up%20to%20date%3F\"><h3>How does it stay up to date?<\/h3><\/dt>\n<dd><p>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.<\/p><\/dd>\n<dt id=\"can%20i%20use%20segments%20in%20other%20plugins%3F\"><h3>Can I use segments in other plugins?<\/h3><\/dt>\n<dd><p>Yes. <code>repeatwright_customer_segment( $email_or_user_id )<\/code> returns the segment key, and every segment can be exported as CSV or turned into a WooCommerce coupon with email restrictions. <code>repeatwright_segment_entered<\/code> \/ <code>repeatwright_segment_left<\/code> 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 <code>wp repeatwright segments refresh<\/code>. They do not fire instantly when an order comes in.<\/p><\/dd>\n<dt id=\"does%20the%20plugin%20send%20anything%20to%20its%20author%3F\"><h3>Does the plugin send anything to its author?<\/h3><\/dt>\n<dd><p>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.<\/p><\/dd>\n<dt id=\"does%20repeatwright%20bundle%20action%20scheduler%3F\"><h3>Does Repeatwright bundle Action Scheduler?<\/h3><\/dt>\n<dd><p>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.<\/p><\/dd>\n<dt id=\"where%20is%20the%20javascript%20source%3F\"><h3>Where is the JavaScript source?<\/h3><\/dt>\n<dd><p>The admin screen is a React app. Its readable source is in <code>assets\/src\/admin\/<\/code>; <code>assets\/build\/admin.js<\/code> is the compiled bundle produced by <code>@wordpress\/scripts<\/code> from <code>package.json<\/code> and <code>webpack.config.js<\/code>. Rebuild it with <code>npm ci &amp;&amp; npm run build<\/code> inside the plugin directory.<\/p><\/dd>\n\n<\/dl>\n\n<!--section=changelog-->\n<h4>1.0.0<\/h4>\n\n<ul>\n<li>Initial release: RFM segments, overview KPIs, customer explorer, segment builder, cohort retention, segment emails with consent gate, coupons, CSV export, privacy tools, WP-CLI and REST API.<\/li>\n<\/ul>","raw_excerpt":"RFM customer segments, repeat rate, LTV and cohort retention from your own WooCommerce orders. Segment emails with a consent gate.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/385288","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=385288"}],"author":[{"embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/emtiazzahid"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=385288"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=385288"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=385288"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=385288"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=385288"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=385288"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}