wc_api_hash

WC API - Hash.

Description

(string) wc_api_hash( (string) $data ); 

Returns (string)

Parameters (1)

0. $data (string)
The data.

Usage

  1. if ( !function_exists( 'wc_api_hash' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'woocommerce/includes/wc-core-functions.php'; 
  3.  
  4. // The data. 
  5. $data = ''; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = wc_api_hash($data); 
  9.  

Defined (1)

The function is defined in the following location(s).

/includes/wc-core-functions.php  
  1. function wc_api_hash( $data ) { 
  2. return hash_hmac( 'sha256', $data, 'wc-api' );