Description
BPro Data Light shows BPro Data (λ0, βI, βO, βL, kI, kR, kL and the BPro amounts XIP … P) as a “BPro” report in WooCommerce > Analytics, built like the Products report: summary tabs above the chart, one column per value in the table, a “Show” filter, a date range.
Compared with the full WC BPro Data plugin it is “light” in three ways:
- One settings page (WooCommerce > BPro Light) with “Show BPro Data at the WooCommerce Analytics” and the Danger Zone “Reset All”. No Import, Structure or Segment pages, metaboxes, Dashboard alerts or admin-bar light.
- No wp_wc_bpro_data table. The BPro values are calculated from the WooCommerce data and cached in transients.
- It follows the WooCommerce Analytics data update. Whenever WooCommerce syncs an order into its Analytics data (
woocommerce_analytics_update_order_stats,woocommerce_order_scheduler_after_import_order), or an order is trashed / deleted, the order is queued and the BPro data is updated about a minute later in one batch. A regular update (every 15 minutes) catches anything else. The “Data status” box at the top right of Analytics > BPro shows when the data was last updated and when the next update runs; its button updates it right now.
What is stored
- Transients
bpro_data_light_p_{id}andbpro_data_light_index: the calculated per-product data. They can be rebuilt from WooCommerce at any time; if they are lost the plugin rebuilds them automatically (first run: all orders, in time-boxed batches). - Option
bpro_data_light_state: the update queue and the last update time. - Option
bpro_data_light_restocks: stock-ins (XLP / XLM). WooCommerce keeps only the current stock quantity, never a history of stock-ins, so these cannot be recalculated; they are recorded when the stock goes up, plus the “starting stock” taken when the plugin is activated.
The calculation of an order’s values (XIP, XIM, YIP, YIM, TXP, TXM, YLP, YLM, DP) and of the balances and ratios is the same as in the full plugin, so both give the same numbers for the same orders.
Notes
- Do not run it together with the full WC BPro Data plugin (both add a “BPro” report to Analytics): Light pauses itself and shows a notice if the full plugin is active.
- Product cost comes from WooCommerce’s Cost of Goods Sold (the cost locked into each order item); stock-ins use the product’s current cost.
- The gauge limits are the defaults: the daily bank rate (derived from a 10% annual rate) for βI, βO, βL and 1 for kI, kR, kL. Filters:
bpro_data_light_npv_discount_rate,bpro_data_light_daily_bank_rate,bpro_data_light_gauge_limit,bpro_data_light_sync_interval,bpro_data_light_sync_delay.
Installation
- Upload the plugin and activate it (WooCommerce must be active).
- Open WooCommerce > BPro Light, tick “Show BPro Data at the WooCommerce Analytics” and save.
- Open WooCommerce > Analytics > BPro. The first calculation runs in the background; “Data status” shows its progress.
FAQ
-
Does it work without WooCommerce?
-
No. WooCommerce must be installed and active.
-
Does it send data anywhere?
-
No. The plugin makes no external requests; all data stays in your WordPress database.
-
What happens to my data when I delete the plugin?
-
Everything the plugin stored (options, transients, recorded stock-ins) is removed on deletion.
Reviews
There are no reviews for this plugin.
Contributors & Developers
“BPro Data Light” is open source software. The following people have contributed to this plugin.
ContributorsTranslate “BPro Data Light” into your language.
Interested in development?
Browse the code, check out the SVN repository, or subscribe to the development log by RSS.
Changelog
1.0.0
- First release.