made a class version of plugin_tools

This commit is contained in:
asus
2024-02-14 01:03:55 +01:00
parent b3671a20e5
commit 259cb8aa00
6 changed files with 291 additions and 27 deletions

View File

@@ -6,10 +6,10 @@ it can be "overloaded" with a callback_response and _error
function ajax_post(ajax_data, action, callback_response, callback_error) {
const data = new FormData();
data.append('action', action);
data.append('_ajax_nonce', wp_ajax._nonce);
data.append('_ajax_nonce', fipfcard_ajax._nonce);
data.append('data', ajax_data);
fetch(wp_ajax._url, {
fetch(fipfcard_ajax._url, {
method: 'POST',
credentials: 'same-origin',
body: data