woocommerce_export_report_data_endpoint
Used to add/overwrite report data endpoint.
Usage
add_filter( 'woocommerce_export_report_data_endpoint', 'wp_kama_woocommerce_export_report_data_endpoint_filter', 10, 2 );
/**
* Function for `woocommerce_export_report_data_endpoint` filter-hook.
*
* @param string $endpoint The report's data endpoint.
* @param string $type The report's type.
*
* @return string
*/
function wp_kama_woocommerce_export_report_data_endpoint_filter( $endpoint, $type ){
// filter...
return $endpoint;
}
- $endpoint(string)
- The report's data endpoint.
- $type(string)
- The report's type.
Changelog
| Since . | Introduced. |
Where the hook is called
woocommerce_export_report_data_endpoint
woocommerce/src/Admin/ReportCSVExporter.php 260-264
$report_endpoint = apply_filters(
'woocommerce_export_report_data_endpoint',
"/wc-analytics/reports/{$this->report_type}",
$this->report_type
);