Importing Historical Data

The plugin does not query your orders live every time you open a report. Instead it keeps a precomputed daily aggregation table, which is what makes the reports fast on stores with tens of thousands of subscriptions. The importer is what fills that table in from your existing data.

Until you run this once, every report shows zeros. This is the first thing to do after activating the plugin on a store that already has subscriptions.
Where to find it

Go to WooCommerce → Settings → Subscription Analytics, in the Import Historical Subscription Data card.

The same importer is also reachable from the Import button in the header of the Subscription Report screen.

Running an import

  • Pick a Date range: All, Last 365 days, Last 90 days, Last 30 days, Last 7 days, Last 24 hours, or Custom.
  • If you chose Custom, set the From and To dates.
  • Click Start Import.
  • Watch the progress bar. The status line updates as each batch completes.

The range is split into weekly batches, all queued at once on WooCommerce’s Action Scheduler and staggered a few seconds apart so they do not compete for resources. On stores with more than 50,000 subscriptions or orders the import can take several minutes.

The settings screen asks you not to close the page, and that is good advice — but closing it will not lose your import. Every batch is queued on the server the moment you click Start Import, and progress is stored in the database, so the work carries on either way. The one thing the open page does is notice when the last batch finishes and mark the import complete. Close the tab and the data still imports fully; the status simply stays on "processing" until you next open the settings page, which then flips it to completed.

What gets imported

A full import rebuilds every dataset the reports rely on:

  • Daily subscription activity — signups, renewals, switches, resubscribes, cancellations and the revenue attached to each, per day.
  • Customer totals — subscriber counts, subscription counts and lifetime value per customer.
  • Revenue recognition schedule — the month-by-month amortization behind the Revenue Recognition tab.
  • Acquisition attribution — the source, campaign and referrer recorded against each subscription.

Days are bucketed in your store’s local time zone, from Settings → General — not UTC. Every report built on this table inherits that.

Attribution can only be backfilled from what WooCommerce already recorded on the original orders. Subscriptions created before WooCommerce Order Attribution existed, or before this plugin was installed, will show as (direct) or Unknown — the import cannot invent a source that was never captured.

Staying up to date afterwards

After the first import you should not need to run it again. The table is kept current in two ways:

  • In real time — subscription and order events (a new signup, a renewal payment, a status change) update the affected day immediately.
  • Nightly — a scheduled job recomputes the last 30 days from the source data, so the reports self-heal from drift caused by a missed hook, a third-party plugin writing orders directly, or plugin downtime. The window is filterable with zorem_subscription_daily_snapshot_window_days.

A refunded order, a failed renewal or a later status change is picked up by whichever of these fires first — the day it belongs to is recomputed from source, so the totals correct themselves without a manual re-import.

Repair Last 30 Days

If a recent day looks wrong and you do not want to wait for the nightly job, use Repair Last 30 Days. Unlike a full import it runs immediately and synchronously rather than queueing batches, so it does not depend on the scheduler — which also makes it the quickest way to confirm whether a problem is stale data or something else.

Developers can widen the window with zorem_subscription_repair_window_days. The value is capped at 90 days, because a synchronous repair over a longer span risks a request timeout.

Re-importing and deleting

Running an import over a range that has already been imported replaces those days rather than adding to them, so re-importing never double-counts. It is always safe to run again.

Starting a second import while one is already running is refused — you will see Import is already in progress. Wait for the first to finish, or reload the settings page to let it register as complete.

Delete Previously Imported Data clears the aggregation tables entirely. A confirmation dialog appears first. This only removes the analytics tables the plugin built — your subscriptions and orders are never touched — but the reports will show zeros until you import again.

When an import stalls

The import is processed by Action Scheduler, the background queue that ships with WooCommerce. Batches are queued in the group zorem-subscription-import. If the queue is not being processed, the import will sit at a fixed percentage and never finish.

  • Open WooCommerce → Status → Scheduled Actions and filter to Pending. If you see actions in the zorem-subscription-import group that are past due, the queue is not running.
  • Action Scheduler is driven by WP-Cron. If DISABLE_WP_CRON is set in wp-config.php, a real server cron job must be hitting wp-cron.php — ask your host to confirm.
  • A site with very little traffic may process the queue slowly, because WP-Cron only fires on page loads. Visiting the admin a few times nudges it along.
  • Check the Failed tab in Scheduled Actions too — a fatal error in a batch shows up there with the reason.
  • If Scheduled Actions shows no pending actions but the status still says processing, the import has actually finished — reload the settings page and it will register as complete.
  • If the queue is genuinely stuck, start the import again. Re-importing replaces rather than duplicates, so nothing is harmed.
Repair Last 30 Days runs without the scheduler. If a repair works but a full import stalls, that confirms the problem is Action Scheduler or WP-Cron rather than the plugin.

Troubleshooting

SymptomWhat to do
Reports show zeros after activationThe historical import has not been run yet. Run it with the range set to All.
Recent days look wrongUse Repair Last 30 Days, or import the last 30 days to recompute them from source.
Revenue Recognition tab is emptyThe recognition schedule is built by the same importer. Run a full import once.
Import is stuck at a fixed percentageAction Scheduler is not processing, or it has finished and nothing has noticed. See When an import stalls above.
Import is already in progress when nothing is runningA previous import finished without the page being open to mark it complete. Reload the settings page, then start again.
Action Scheduler is not availableWooCommerce is inactive or too old. Action Scheduler ships with WooCommerce and the import cannot run without it.
Import finishes but some days are still emptyThose days genuinely had no subscription activity, or the orders sit in a status the reports exclude. Check a known order’s status.
Attribution is mostly (direct) after importingExpected on historical data — the original orders carry no recorded source. See Acquisition Sources.
The import triggers a memory or timeout errorImport a narrower range at a time — for example year by year — rather than All.