簡體   English   中英

woocommerce API 中的時間戳無效

[英]Invalid Timestamp in woocommerce API

我們在處理 WooCommerce 的 REST API v2 版本時收到以下錯誤。 當我們從 http 的 localhost 檢索數據時,它工作正常,但現在我們已將其上傳到 https 的服務器。

這是我們得到的錯誤:

stdClass Object
(
[errors] => Array
    (
        [0] => stdClass Object
            (
                [code] => woocommerce_api_authentication_error
                [message] => Invalid Timestamp
            )
    )
)

根據 wordpress 論壇,當服務器時間戳和 API 時間戳不同時,就會出現這些錯誤。 我們也嘗試更改時間戳,但仍然沒有任何運氣。

woocomerce API 檢查時間戳是否有效:

如果時間戳在現在的 15 分鍾內,則它是有效的。

請檢查 |客戶端時間 - 服務器時間 | < 15 分鍾。

檢查服務器 - 客戶端時區。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM