woocommerce_export_report_data_endpoint
Used to add/overwrite report data endpoint.
Использование
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(строка)
- The report's data endpoint.
- $type(строка)
- The report's type.
Список изменений
| С версии . | Введена. |
Где вызывается хук
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
);