StockOracle AI / Docs
Docs Getting Started

Getting Started

Have StockOracle AI running in your WordPress admin in under 5 minutes.

System Requirements

Before installing, verify your environment meets these minimum requirements.

Component Minimum Recommended
WordPress6.06.4+
WooCommerce7.08.0+ with HPOS
PHP7.48.1+
MySQL / MariaDB5.7 / 10.38.0 / 10.6+
WP-CronEnabledSystem cron preferred

HPOS Compatibility

StockOracle AI supports both WooCommerce Classic order storage and the new High Performance Order Storage (HPOS / custom_order_tables). Detection is automatic — no manual configuration needed.

Install the Free Plugin

There are two installation methods:

Method 1 — WordPress Admin (Recommended)

  1. In your WordPress admin, go to Plugins → Add New Plugin.
  2. Search for StockOracle AI in the search box.
  3. Click Install Now on the StockOracle AI plugin card.
  4. Once installed, click Activate.
  5. You will see a success notice. Navigate to StockOracle → Dashboard to get started.

Method 2 — Manual Upload

  1. Download the stockoracle-ai.zip file from WordPress.org.
  2. Go to Plugins → Add New Plugin → Upload Plugin.
  3. Click Choose File, select the ZIP, then click Install Now.
  4. Click Activate Plugin after installation.

What happens on activation?

The activator creates three database tables (stockoracle_daily_sales, stockoracle_cache, stockoracle_stockout_log), seeds default settings, and schedules two WP-Cron events (daily data collection + weekly alert digest).

Install the Pro Addon

The Pro addon extends the free plugin. The free plugin must be installed and active first.

  1. Purchase StockOracle AI Pro at themefreex.com/stockoracle-ai-pro.
  2. Download stockoracle-ai-pro.zip from your account dashboard.
  3. Go to Plugins → Add New Plugin → Upload Plugin, upload the ZIP, and activate.
  4. Navigate to StockOracle → License and enter your license key to activate it.

License Activation Required

Pro features are gated behind license activation. The license key is tied to a domain. One license = one domain (unless you purchased a multi-site license).

Initial Configuration

After activation, visit StockOracle → Settings and configure these key settings first:

General Tab

  • Forecast Period — Days of history used for demand forecasting (default: 30). For stores with longer sales cycles, increase to 60–90 days.
  • Dead Stock Threshold — Days with zero sales before a product is flagged (default: 90).
  • Default Lead Time — Days from placing an order to receiving stock (default: 7). Set this to your average supplier lead time.
  • Safety Stock Buffer — Extra days of stock to keep as a buffer (default: 3). Increase if your supplier is unreliable.
  • Low Stock Threshold — Products at or below this unit count show as "Low Stock" (default: 5).
  • Analysis Period — Days of order history used for velocity calculations (default: 90).

Alerts Tab

  • Toggle Email Alerts on to receive weekly digest emails when products need attention.
  • Set the Alert Email — defaults to the WordPress admin email.
  • Choose which alert types (Critical, Warning, Info) trigger email notifications.

Save Settings

Click Save Changes on each tab. Settings are stored in a single serialized option (stockoracle_settings) for efficiency.

Dashboard Tour

Navigate to StockOracle → Dashboard to see your inventory at a glance.

🟢 Health Score

A 0–100 score (grade A–F) measuring five inventory health factors. Green ≥ 70, Yellow 40–69, Red < 40.

📊 Stat Cards

Total SKUs, In Stock, Low Stock, Out of Stock, Total Inventory Value, and Dead Stock Value.

📈 Charts

Stock Distribution doughnut, Sales Velocity (Top 10) bar chart, and 30-Day Sales Trend line chart — all powered by Chart.js (bundled locally).

🔔 Reorder Alerts

Products that have crossed their calculated reorder point. Color-coded by severity (Critical / Warning / Info).

Click Refresh in the top-right of the dashboard to force a data recalculation. Data is also refreshed automatically by the daily WP-Cron job.

WP-Cron Setup

StockOracle AI relies on two WP-Cron events for automated operation:

  • stockoracle_daily_data_collection — Runs once daily to populate stockoracle_daily_sales from yesterday's completed orders.
  • stockoracle_weekly_alerts — Runs once weekly to send email alert digests (if enabled in settings).

For high-traffic stores, replace WP-Cron with a real system cron. Add this to your server's crontab:

# Disable WP-Cron HTTP trigger in wp-config.php:
define('DISABLE_WP_CRON', true);

# Add to server crontab — runs every 5 minutes:
*/5 * * * * wget -q -O /dev/null https://example.com/wp-cron.php?doing_wp_cron
# Or with WP-CLI:
*/5 * * * * wp --path=/var/www/html cron event run --due-now

Uninstalling

Deactivating the plugin only removes scheduled cron events. All data is preserved for re-activation.

To completely remove all plugin data, go to Plugins, deactivate, then click Delete. The uninstall.php handler will:

  • Delete all stockoracle_* options from wp_options
  • Drop the three custom database tables
  • Clear all scheduled cron events

Data Loss Warning

Deleting the plugin permanently removes all cached analytics data and historical sales aggregates. Your original WooCommerce order data is never touched.