woocommerce_webhook_hash_algorithm

FILTER woocommerce\includes\class-wc-webhook.php (ligne 453) github
Generate a base64-encoded HMAC-SHA256 signature of the payload body so the recipient can verify the authenticity of the webhook. Note that the signature is calculated after the body has already been encoded (JSON by default).

Paramètres

Entrée :
'sha256', $payload, $this->get_id(
Sortie :
@param  string $payload Payload data to hash.
@return string

Utilisation

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

function ma_fonction_filtre('sha256') {
    // Modifier la valeur
    return 'sha256';
}

Actualités

Chargement des actualités...