WC_API_Authentication::__construct()publicWC 2.1

Setup class

Method of the class: WC_API_Authentication{}

No Hooks.

Return

null. Nothing (null).

Usage

$WC_API_Authentication = new WC_API_Authentication();
$WC_API_Authentication->__construct();

Changelog

Since 2.1 Introduced.

WC_API_Authentication::__construct() code WC 8.6.1

public function __construct() {

	// To disable authentication, hook into this filter at a later priority and return a valid WP_User
	add_filter( 'woocommerce_api_check_authentication', array( $this, 'authenticate' ), 0 );
}