Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 27/04/23 in all areas

  1. u need to include the data you want to send as the third argument to the fetchRemote, also the method should be in string local apiKey = "..." local forumAddress = "..." function testing(orderID, content) local sendOptions = { connectionAttempts = 5, connectTimeout = 7000, method = "POST", headers = { ["Content-Type"] = "application/json", }, } local postData = toJSON({ status = "completed", }) fetchRemote(forumAddress.."/wp-json/wc/v3/orders/"..orderID.."?key="..apiKey, sendOptions, function(responseData, error) if error == 0 then outputChatBox("success" .. responseData) else outputChatBox("failed, " .. error) end end, postData) end
    1 point
×
×
  • Create New...