Skip to content

Commit

Permalink
Update translate.js
Browse files Browse the repository at this point in the history
  • Loading branch information
proggeramlug authored Oct 20, 2023
1 parent 4016987 commit c5b8333
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions assets/translate.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,12 @@ async function acft_translate() {
if (c == false) {
let c = await acft_sign_up();
acft_license_code = c.licenseKey;
let r1 = (await fetch(acft_save_license_url + "?key="+c.licenseKey)).json();
let r1 = await fetch(ajaxurl,{
method: 'POST',
headers: {
'Content-Type': 'application/x-www-form-urlencoded;charset=UTF-8',
},
body: "action=acft_save_license_key&key="+c.licenseKey});
c = await acft_check();
}
currentState = c;
Expand Down Expand Up @@ -171,7 +176,13 @@ async function init() {
if (c == false) {
let c = await acft_sign_up();
acft_license_code = c.licenseKey;
let r1 = (await fetch(acft_save_license_url + "?key="+c.licenseKey)).json();
let r1 = await fetch(ajaxurl,{
method: 'POST',
headers: {
'Content-Type': 'application/x-www-form-urlencoded;charset=UTF-8',
},
body: "action=acft_save_license_key&key="+c.licenseKey});
console.log("register: ", await r1.json());
c = await acft_check();
}
currentState = c;
Expand Down

0 comments on commit c5b8333

Please sign in to comment.