我也面临同样的问题。wp api和woocommerce api的Jwt身份验证不与in一起工作ionic3 和woocommerce。我已经解决了这个问题,并做了以下工作
转到->plugins/jwt-authentication-for-wp-rest-api/includes/class-jwt-auth.php
搜索函数define\\u public\\u hooks(),并注释最后两行
private function define_public_hooks()
{
$plugin_public = new Jwt_Auth_Public($this->get_plugin_name(), $this->get_version());
$this->loader->add_action(\'rest_api_init\', $plugin_public, \'add_api_routes\');
$this->loader->add_filter(\'rest_api_init\', $plugin_public, \'add_cors_support\');
//$this->loader->add_filter(\'determine_current_user\', $plugin_public, \'determine_current_user\', 10);
//$this->loader->add_filter( \'rest_pre_dispatch\', $plugin_public, \'rest_pre_dispatch\', 10, 2 );
}
谢谢,祝你愉快。