WPRuby Logo WPRuby
Log in Get started
  • Plugins
  • Themes
  • Docs
  • Blog
    • eCommerce
    • Plugins
    • How to
    • Coding
  • Affiliate Area
  • Contact Us
  • About Us
  • Plugins
  • Themes
  • Docs
  • Blog
    • eCommerce
    • Plugins
    • How to
    • Coding
  • Affiliate Area
  • Contact Us
  • About Us

WPRuby Account

4
  • How to upgrade your license
  • How to renew your license
  • How to change your plugin’s license domain
  • How to cancel your subscription.

WooCommerce Australia Post Shipping Method Pro

14
  • Installation
  • How to activate your Australia Post Pro license
  • How to Upgrade from Free to Pro
  • Australia Post Zone Settings
  • Australia Post Global Settings
  • Australia Post Tracking
  • Pre-Paid Satchels
  • How to Mark a Product to be Shipped Individually?
  • TroubleShooting and Common issues
  • Available WordPress Actions and Filters
  • [Labels Pro] How to connect the plugin with your MyPost Business account
  • [Labels Pro] How to connect Labels Pro with your eParcel account
  • [Labels Pro] How to print labels and create shipping orders.
  • [Labels Pro] How to Mark a Product as Containing Hazardous Materials?

WooCommerce Custom Payment Gateway Pro

11
  • Getting Started
  • Custom Payment Gateway Settings
  • Custom Checkout Field Builder
  • Conditional Display Rules
  • Sending Payment Data to an External API
  • How to Create a Pay by Invoice Payment Method
  • How to Create a Manual Payment Link or Review-Based Payment Method
  • Troubleshooting
  • Frequently Asked Questions
  • Security and Sensitive Payment Data
  • How to Upgrade from Free to Pro

WooCommerce Royal Mail Shipping Calculator Pro

4
  • Installation
  • Settings
  • TroubleShooting and Common issues
  • How to activate your plugin license

Controlled Admin Access Pro

3
  • Available Actions for a Restricted Admin
  • Installation
  • Settings

WooCommerce Address Guard Pro

7
  • Get Started
  • Configuring Address Providers
  • Configuring Checkout Validation
  • Creating Address Rules
  • Customizing Customer Messages
  • Using the Address Tester
  • Reviewing Address Quality Inside WooCommerce Orders

WooCommerce Simple Table Rates Pro

8
  • Installation
  • Settings
  • Rules and Actions
  • How to Setup Weight Based Shipping
  • How To Setup Shipping By Shipping Class
  • How to Setup Shipping by Cart Total
  • How to Setup Shipping by Product
  • How to Setup Shipping by Product Category

WooCommerce Pack IQ

5
  • Installation
  • How to activate your plugin license
  • How to add a new box
  • How to change the boxes weight and dimensions units
  • How to view the packing results

WooCommerce Restricted Shipping and Payment Pro

4
  • Installation
  • Setting Up Shipping Methods Conditions
  • Available Shipping & Payment Rules
  • Setting Up Payment Gateways Conditions

Affiliate Butler PRO

9
  • Installation and Upgrade
  • Quick Start Guide
  • Settings
  • Keywords Management
  • Installation
  • Frequently Asked Questions
  • Files Structure
  • Links Types
  • Statistics

WooCommerce Adyen Payment Gateway

2
  • Setup the Adyen payment gateway
  • How to configure Adyen Webhook notifications? 

WooCommerce Free Shipping Per Product

2
  • Installation
  • How to setup free shipping for a certain product

WooCommerce UPS Shipping Method Pro

4
  • Installation
  • UPS Zone Settings
  • UPS Global Settings
  • How to get the UPS Access Key?

Delivery Promise for WooCommerce

9
  • Getting Started
  • Understanding Processing Time vs Transit Time
  • Setting the Cutoff Countdown
  • Configuring Default Delivery Estimates
  • Creating Delivery Rules
  • Setting Working Days and Holidays
  • Using Rule Presets
  • Product-Level Lead Times
  • Why the “Order Within” Countdown Is Not Showing

Cartavera

16
  • Cartavera documentation
  • Install Cartavera
  • Activate your licence
  • Import a starter site
  • Styles, colours and fonts
  • Headers and footers
  • The homepage
  • Catalog and filters
  • The product page
  • Cart and checkout
  • Translation and right-to-left languages
  • Child themes
  • Hooks and filters reference
  • Troubleshooting
  • FAQ
  • Changelog

Candy Shop

14
  • Candy Shop documentation
  • Install Candy Shop
  • Activate your licence
  • Import a starter site
  • Set up your products
  • Food information and allergens
  • Shop pages and filters
  • Styles, colors and fonts
  • Headers, footers and menus
  • The homepage
  • Child theme
  • Hooks and filters
  • FAQ
  • Changelog

Foliowick

16
  • Foliowick documentation
  • Install Foliowick
  • Activate your licence
  • Import a demo store
  • Authors and author pages
  • Book details and editions
  • Genres, reading lists and the Editor’s Pick
  • Secondhand copies and forthcoming books
  • Shop pages, search and book pages
  • Styles, colors and fonts
  • Headers, footers and menus
  • The homepage
  • The journal and editorial pages
  • Hooks and filters
  • FAQ
  • Changelog

Gemelune

14
  • Gemelune documentation
  • Install Gemelune
  • Activate your licence
  • Import a starter site
  • Metals, sizes and swatches
  • Size guide, delivery and care pages
  • Shop pages, product cards and product pages
  • Styles, colors and fonts
  • Headers, footers and menus
  • The homepage
  • Child theme
  • Hooks and filters
  • FAQ
  • Changelog

Formafern

15
  • Formafern documentation
  • Install Formafern
  • Activate your licence
  • Import the demo store
  • Finishes and swatches
  • Dimensions, materials and care
  • Rooms and Shop the Room
  • Shop pages, product cards and product pages
  • Styles, colors and fonts
  • Headers, footers and menus
  • The homepage and editorial pages
  • Child theme
  • Hooks and filters
  • FAQ
  • Changelog

Pawtani

15
  • Pawtani documentation
  • Install Pawtani
  • Activate your licence
  • Install a starter site
  • Pets, sizes, flavours and product facts
  • Size & fit guides
  • Shop pages, filters and product pages
  • Repeat purchases, subscriptions and wishlists
  • Styles, colors and fonts
  • Headers, footers and menus
  • The homepage
  • Child theme
  • Hooks and filters
  • FAQ
  • Changelog

Deep Insights for WooCommerce

19
  • Getting Started with Deep Insights for WooCommerce
  • Upgrading from Woo Insights
  • Importing Your Order History
  • Dates, Comparisons and Filters
  • Revenue Report
  • Products Reports
  • Customer Reports
  • RFM Customer Segments
  • Retention and Cohorts
  • Profitability and Cost of Goods
  • Subscriptions Analytics
  • Inventory Intelligence
  • Shipping, Discounts and Refunds
  • Automated Insights
  • Settings Reference
  • Why Numbers Can Differ from WooCommerce Analytics
  • Troubleshooting
  • Privacy, Security and Updates
  • Developer Hooks
View Categories
  • Home
  • Knowledge Base
  • Deep Insights for WooCommerce
  • Developer Hooks

Developer Hooks

Waseem
Updated on November 13, 2026

2 min read

0:00 / 2:01
  • View as Markdown Open this page as plain Markdown (opens in a new tab)
  • Open in ChatGPT Ask questions about this page (opens in a new tab)
  • Open in Claude Ask questions about this page (opens in a new tab)
  • Open in Google AI Studio Ask questions about this page (Google account required) (opens in a new tab)

Deep Insights for WooCommerce includes filters for developers. Add them in a small custom plugin or your theme’s functions.php.

Table of Contents

Toggle
  • Filters
  • Example: let editors view reports
  • Example: add a cost-of-goods source
  • Example: carrier shipping costs
  • REST API

Filters

FilterPurpose
deep_insights_view_capabilityCapability needed to view reports. Default view_woocommerce_reports.
deep_insights_manage_capabilityCapability needed for settings, imports and customer-level exports. Default manage_woocommerce.
deep_insights_order_typesOrder types to import. Default shop_order.
deep_insights_import_time_limitSeconds each background import job may run. Default 20.
deep_insights_cost_providersAdd a cost-of-goods source.
deep_insights_shipping_cost_providersAdd a carrier shipping cost source.
deep_insights_reportsRegister extra report classes.
deep_insights_update_checksReturn false to stop update checks against wpruby.com.

Deep Insights also respects WooCommerce’s woocommerce_analytics_is_test_order filter.

Example: let editors view reports

add_filter( 'deep_insights_view_capability', function () {
	return 'edit_others_posts';
} );

Example: add a cost-of-goods source

If your product costs come from another plugin, implement the CostProvider interface. Return the recorded cost of an order line, or null when it is unknown. Never return an estimate.

use DeepInsights\Integrations\Costs\CostProvider;

class My_Cost_Provider implements CostProvider {
	public function id() { return 'my_costs'; }
	public function label() { return 'My cost plugin'; }
	public function is_available() { return class_exists( 'My_Cost_Plugin' ); }
	public function get_line_cost( \WC_Order_Item_Product $item, \WC_Abstract_Order $order ) {
		$value = $item->get_meta( '_my_line_cost', true );
		return '' === $value ? null : (float) $value;
	}
}

add_filter( 'deep_insights_cost_providers', function ( $providers ) {
	array_unshift( $providers, new My_Cost_Provider() );
	return $providers;
} );

Costs are read when an order syncs. After adding a provider, run Settings → Data → Rebuild from order history to bring in costs for past orders.

Example: carrier shipping costs

Implement DeepInsights\Integrations\Shipping\ShippingCostProvider and register it with deep_insights_shipping_cost_providers. Its get_costs( array $order_ids ) method returns [ order_id => [ 'cost' => float, 'carrier' => string ] ], and is_estimate() says whether the costs are estimates. Estimated costs are labelled as such in the Shipping report.

REST API

The dashboard uses the deep-insights/v1 REST namespace with WordPress cookie authentication. Routes include /reports/{report}, /export/{report}, /status, /options and /settings. Each route checks the capabilities above.

Privacy, Security and UpdatesGetting Started with Deep Insights for WooCommerce
WPRuby Logo WPRuby

In 2015, WPRuby was established as an independent agency where we focus on producing and supporting many WordPress plugins. Each product we develop is simple to use and easy to customize and backed by awesome support and regular updates.

Resources

  • Knowledge Base
  • Affiliate Area
  • About Us
  • Nomad Jar
  • GarnerDocs
  • UnavailableToday

Legal

  • Privacy Policy
  • Terms of Use

Follow us

  • Github
  • X.com
  • LinkedIn
  • Facebook

© 2026 - WPRuby