wip connecting user with payment

This commit is contained in:
asus
2024-02-25 01:46:33 +01:00
parent 1464562379
commit 01187a8450
6 changed files with 132 additions and 29 deletions

View File

@@ -59,6 +59,9 @@ class PLGNTLS_class
// add ajax file at beginning of files list
array_unshift($scripts_arr, "utils/plugin_ajax.js");
$ajax_nonce = array("ajax_nonce" => wp_create_nonce('wp-pageviews-nonce'));
// for the custom endpoints in rest api to work
// they need to have a nonce named 'wp_rest'
// see : https://developer.wordpress.org/rest-api/using-the-rest-api/authentication/
$rest_nonce = array("rest_nonce" => wp_create_nonce('wp_rest'));
$ajax_url = array("ajax_url" => admin_url('admin-ajax.php'));
$vars = array_merge($vars, $ajax_nonce);