woocommerce_rest_prepare_{$this->post_type}

FILTER woocommerce\includes\rest-api\Controllers\Version2\class-wc-rest-webhooks-v2-controller.php (ligne 73) github
Filter webhook object returned from the REST API.

Paramètres

Entrée :
$response, $webhook, $request
Sortie :
@param WP_REST_Response $response The response object.
@param WC_Webhook       $webhook  Webhook object used to create response.
@param WP_REST_Request  $request  Request object.

Utilisation

// Modifier la valeur avec le filtre 'woocommerce_rest_prepare_{$this->post_type}'
add_filter('woocommerce_rest_prepare_{$this->post_type}', 'ma_fonction_filtre', 10, 1);

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

Actualités

Chargement des actualités...