WordPress filter hook
wcfm_vendor_sales_by_date_chart_colors
Fired by 2 WordPress plugins, running on 10K+ sites between them.
How to use wcfm_vendor_sales_by_date_chart_colors
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:
add_filter( 'wcfm_vendor_sales_by_date_chart_colors', function( $value ) {
// Change $value here.
return $value;
}, 10, 1 );Argument names come from WCFM's source. Other plugins may pass different values: check the call in the plugin you're targeting below.
2 plugins that fire wcfm_vendor_sales_by_date_chart_colors
Sorted by active installs. Each entry shows where the plugin calls the hook and what it passes.
-
WCFM10,000+ installs
apply_filters( 'wcfm_vendor_sales_by_date_chart_colors', array( 'average' => '#95a5a6', 'order_count' => '#f8cb00', 'item_count' => '#ffc107', 'tax_amount' => '#73818f', 'shipping_amount' => '#6f42c1', 'earned' => '#20a8d8', 'commission' => '#20c997', 'gross_sales_amount' => '#3498db', 'refund' => '#e83e8c', ) )views/reports/wcfm-view-reports-wcfmmarketplace-sales-by-date.php:62 -
SCD10+ installs
apply_filters( 'wcfm_vendor_sales_by_date_chart_colors', array( 'average' => '#95a5a6', 'order_count' => '#f8cb00', 'item_count' => '#ffc107', 'tax_amount' => '#73818f', 'shipping_amount' => '#6f42c1', 'earned' => '#20a8d8', 'commission' => '#20c997', 'gross_sales_amount' => '#3498db', 'refund' => '#e83e8c', ) )includes/admin/scd-wcfm-views-report-sales-by-date.php:63
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.