woocommerce_report_sales_by_category_get_products_in_category
Usage
add_filter( 'woocommerce_report_sales_by_category_get_products_in_category', 'wp_kama_woocommerce_report_sales_by_category_get_products_in_filter', 10, 2 ); /** * Function for `woocommerce_report_sales_by_category_get_products_in_category` filter-hook. * * @param $product_ids * @param $category_id * * @return */ function wp_kama_woocommerce_report_sales_by_category_get_products_in_filter( $product_ids, $category_id ){ // filter... return $product_ids; }
- $product_ids
- -
- $category_id
- -
Where the hook is called
woocommerce_report_sales_by_category_get_products_in_category
woocommerce/includes/admin/reports/class-wc-report-sales-by-category.php 68
return array_unique( apply_filters( 'woocommerce_report_sales_by_category_get_products_in_category', $product_ids, $category_id ) );