2020-05-04 22:58:39 +00:00
|
|
|
/**
|
|
|
|
* External dependencies
|
|
|
|
*/
|
|
|
|
import { applyFilters } from '@wordpress/hooks';
|
2021-03-17 00:27:26 +00:00
|
|
|
/**
|
|
|
|
* List of homepage stats enabled by default
|
|
|
|
*
|
|
|
|
* @hook woocommerce_admin_homepage_default_stats
|
|
|
|
* @example
|
|
|
|
* addFilter(
|
|
|
|
* 'woocommerce_admin_homepage_default_stats',
|
|
|
|
* 'plugin-domain',
|
|
|
|
* ( defaultStats ) =>
|
|
|
|
* defaultStats.filter( ( stat ) => stat !== 'jetpack/stats/views' )
|
|
|
|
*);
|
|
|
|
*/
|
2020-05-04 22:58:39 +00:00
|
|
|
export const DEFAULT_STATS = applyFilters(
|
|
|
|
'woocommerce_admin_homepage_default_stats',
|
|
|
|
[
|
|
|
|
'revenue/total_sales',
|
|
|
|
'revenue/net_revenue',
|
|
|
|
'orders/orders_count',
|
|
|
|
'products/items_sold',
|
2020-06-04 23:14:55 +00:00
|
|
|
'jetpack/stats/visitors',
|
|
|
|
'jetpack/stats/views',
|
2020-05-04 22:58:39 +00:00
|
|
|
]
|
|
|
|
);
|
|
|
|
|
|
|
|
export const DEFAULT_HIDDEN_STATS = [
|
|
|
|
'revenue/net_revenue',
|
|
|
|
'products/items_sold',
|
|
|
|
];
|