woocommerce_api_check_authentication filter-hookWC 1.0

allow plugins to remove default authentication or add their own authentication

Usage

add_filter( 'woocommerce_api_check_authentication', 'wp_kama_woocommerce_api_check_authentication_filter', 10, 2 );

/**
 * Function for `woocommerce_api_check_authentication` filter-hook.
 * 
 * @param  $null 
 * @param  $that 
 *
 * @return 
 */
function wp_kama_woocommerce_api_check_authentication_filter( $null, $that ){

	// filter...
	return $null;
}
$null
-
$that
-

Where the hook is called

WC_API_Server::check_authentication()
woocommerce_api_check_authentication
woocommerce/includes/legacy/api/v1/class-wc-api-server.php 161
$user = apply_filters( 'woocommerce_api_check_authentication', null, $this );
woocommerce/includes/legacy/api/v3/class-wc-api-server.php 154
$user = apply_filters( 'woocommerce_api_check_authentication', null, $this );
woocommerce/includes/legacy/api/v2/class-wc-api-server.php 154
$user = apply_filters( 'woocommerce_api_check_authentication', null, $this );

Where the hook is used in WooCommerce

woocommerce/includes/legacy/api/v1/class-wc-api-authentication.php 26
add_filter( 'woocommerce_api_check_authentication', array( $this, 'authenticate' ), 0 );
woocommerce/includes/legacy/api/v2/class-wc-api-authentication.php 26
add_filter( 'woocommerce_api_check_authentication', array( $this, 'authenticate' ), 0 );
woocommerce/includes/legacy/api/v3/class-wc-api-authentication.php 26
add_filter( 'woocommerce_api_check_authentication', array( $this, 'authenticate' ), 0 );