changed add_var_to_front back to using add_inline instead as localize, because need to not overwrite the variables
This commit is contained in:
@@ -1,13 +1,17 @@
|
||||
/*
|
||||
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
*/
|
||||
function ajax_post(mydata, action, callback_response, callback_error) {
|
||||
function ajax_post(ajax_data, action, callback_response, callback_error) {
|
||||
console.log("in ajac_post, ajax_data :");
|
||||
console.log(ajax_data);
|
||||
const data = new FormData();
|
||||
data.append('action', action);
|
||||
data.append('_ajax_nonce', php_data.nonce);
|
||||
data.append('data', mydata);
|
||||
data.append('_ajax_nonce', nonce);
|
||||
data.append('data', ajax_data);
|
||||
console.log("data: ");
|
||||
console.log(data);
|
||||
|
||||
fetch(php_data.ajax_url, {
|
||||
fetch(ajax_url, {
|
||||
method: 'POST',
|
||||
credentials: 'same-origin',
|
||||
body: data
|
||||
|
||||
Reference in New Issue
Block a user