WordPress filter hook

woocommerce_admin_report_chart_data

Defined by WooCommerce and fired by 7 plugins in total, running on 7M+ sites between them.

How to use woocommerce_admin_report_chart_data

It's a filter: your callback receives the value, and must return the (changed) value. Add this to your theme's functions.php or a small custom plugin:

functions.php
add_filter( 'woocommerce_admin_report_chart_data', function( $data ) {
	// Change $data here.
	return $data;
}, 10, 1 );

Argument names come from WooCommerce's source. Other plugins may pass different values: check the call in the plugin you're targeting below.

7 plugins that fire woocommerce_admin_report_chart_data

Sorted by active installs. Each entry shows where the plugin calls the hook and what it passes.

  1. WooCommerce icon WooCommerce7+ million installs apply_filters( 'woocommerce_admin_report_chart_data', $data ) includes/admin/reports/class-wc-report-sales-by-date.php:679
  2. WCFM icon WCFM10,000+ installs apply_filters( 'woocommerce_admin_report_chart_data', $data ) includes/reports/class-dokan-report-sales-by-date.php:790
  3. Upsell Funnel Builder for WooCommerce icon Upsell Funnel Builder for WooCommerce2,000+ installs apply_filters( 'woocommerce_admin_report_chart_data', $data ) reporting/class-wps-upsell-order-bump-report-sales-by-date.php:419
  4. Currency per Product for WooCommerce icon Currency per Product for WooCommerce2,000+ installs apply_filters( 'woocommerce_admin_report_chart_data', $data ) includes/admin/class-report-sales-by-date.php:673
  5. Jovvie Point of Sale POS for WooCommerce icon Jovvie Point of Sale POS for WooCommerce100+ installs apply_filters( 'woocommerce_admin_report_chart_data', $data ) includes/Admin/Reports/ReportSalesByGateway.php:720
  6. GG Multiple Payment Routing for WooCommerce icon GG Multiple Payment Routing for WooCommerce30+ installs apply_filters( 'woocommerce_admin_report_chart_data', $data ) inc/Common/Module/Report/Paypal.php:762
  7. Licenses Manager for WooCommerce icon Licenses Manager for WooCommerce10+ installs apply_filters( 'woocommerce_admin_report_chart_data', $data ) lib/controllers/backend/reports/view/class-activations-by-product.php:524

Need a customisation built on this hook?

Tell us what you want to change and which plugin it's for. We'll write it, test it and send it back as a small plugin.