gpt4 book ai didi

wordpress - 如何在我的 wordpress 网站上启用 REST API?

转载 作者:行者123 更新时间:2023-12-05 05:06:01 30 4
gpt4 key购买 nike

我试过这条线,它是正确的方法吗? https://nplus1bicycles.com/?rest_route=/ enter image description here

我遇到了这个错误

Fatal error: Uncaught Error: Undefined class constant 'DOWNLOAD_JOBS' in /home/nplusbic/public_html/wp-content/plugins/wpml-translation-management/classes/ATE/REST/Download.php:27 
Stack trace:
#0 /home/nplusbic/public_html/wp-content/plugins/sitepress-multilingual-cms/classes/API/REST/Adaptor.php(18): WPML\TM\ATE\REST\Download->get_routes()
#1 /home/nplusbic/public_html/wp-content/plugins/sitepress-multilingual-cms/classes/API/REST/Base.php(23): WPML\Rest\Adaptor->add_hooks()
#2 /home/nplusbic/public_html/wp-content/plugins/sitepress-multilingual-cms/classes/action-filter-loader/class-wpml-action-filter-loader.php(151): WPML\Rest\Base->add_hooks()
#3 /home/nplusbic/public_html/wp-content/plugins/sitepress-multilingual-cms/classes/action-filter-loader/class-wpml-action-filter-loader.php(121): WPML_Action_Filter_Loader->run_factory(Object(WPML\TM\REST\FactoryLoader))
#4 /home/nplusbic/public_html/wp-includes/class-wp-hook.php(288): WPML_Action_Filter_Loader->deferred_loader(Object(WP_REST_Server))
#5 /home/nplusbic/public_h in /home/nplusbic/public_html/wp-content/plugins/wpml-translation-management/classes/ATE/REST/Download.php on line 27
There has been a critical error on your website.

最佳答案

您不必启用它。

https://yoursite.com/wp-json/namespace/route

这里有一个很好的使用资源:

Rest API reference

关于wordpress - 如何在我的 wordpress 网站上启用 REST API?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60216816/

30 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com