woocommerce_rest_prepare_note

FILTER woocommerce\src\Admin\API\Notes.php (ligne 609) github
Filter a note returned from the API. Allows modification of the note data right before it is returned.

Paramètres

Entrée :
$response, $data, $request
Sortie :
@param WP_REST_Response $response The response object.
@param array            $data The original note.
@param WP_REST_Request  $request  Request used to generate the response.

Utilisation

// Modifier la valeur avec le filtre 'woocommerce_rest_prepare_note'
add_filter('woocommerce_rest_prepare_note', 'ma_fonction_filtre', 10, 1);

function ma_fonction_filtre($response) {
    // Modifier la valeur
    return $response;
}

Actualités

Chargement des actualités...