Filter a report returned from the API. Allows modification of the report data right before it is returned.
$response, $report, $request
Sortie :
@param WP_REST_Response $response The response object. @param object $report The original report object. @param WP_REST_Request $request Request used to generate the response.
// Modifier la valeur avec le filtre 'woocommerce_rest_prepare_report'
add_filter('woocommerce_rest_prepare_report', 'ma_fonction_filtre', 10, 1);
function ma_fonction_filtre($response) {
// Modifier la valeur
return $response;
}
Chargement des actualités...