woocommerce_webhook_hash_algorithm

woocommerce_webhook_hash_algorithm

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: filter

See hook in core

Displaying hooks found in version: woocommerce.9.3.3

apply_filters('woocommerce_webhook_hash_algorithm') is found 1 times:

  • /includes/class-wc-webhook.php line 452
    	 * @param  string $payload Payload data to hash.
    	 * @return string
    	 */
    	public function generate_signature( $payload ) {
    		$hash_algo = apply_filters( 'woocommerce_webhook_hash_algorithm', 'sha256', $payload, $this->get_id() );
    
    		// phpcs:ignore WordPress.PHP.DiscouragedPHPFunctions.obfuscation_base64_encode
    		return base64_encode( hash_hmac( $hash_algo, $payload, wp_specialchars_decode( $this->get_secret(), ENT_QUOTES ), true ) );
    	}
    
    	/**