我已经创建了自定义API,它工作正常,但我无法对其进行身份验证,它返回的结果没有检查密钥
我已经从管理员创建了使用者密钥和密钥。
如何验证对API的请求。
我尝试了一种解决方案,效果如预期,但我的问题是,
认证自定义API的标准方式是什么
my current solution
require_once \'/woocommerce/includes/legacy/api/v1/class-wc-api-authentication.php\';
$test = new WC_API_Authentication();
$user = wp_get_current_user();
$test->authenticate($user);