Similar to WP core's `rest_request_after_callbacks` filter, this allows to modify the response after it has been generated. Allows backward compatibility with the `rest_request_after_callbacks` filter by providing the same arguments.
$response, $handler, $request
Sortie :
@param WP_REST_Response|WP_HTTP_Response|WP_Error|mixed $response Result to send to the client. @param array $handler Route handler used for the request. @param WP_REST_Request $request Request used to generate the response.
// Modifier la valeur avec le filtre 'woocommerce_hydration_request_after_callbacks'
add_filter('woocommerce_hydration_request_after_callbacks', 'ma_fonction_filtre', 10, 1);
function ma_fonction_filtre($response) {
// Modifier la valeur
return $response;
}
Chargement des actualités...