updated plgntls :
- renamed PLGNTLS_class -> Plgntls - changed method 'add_to_front()' to static method - moved fetch script as inline script, so the plgntls file is single - improved the way inline script and styles are added
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
import { resultMessage } from './result_message.js';
|
||||
import { PLGNTLS_fetch } from '../../utils/plgntls_fetch.js';
|
||||
|
||||
|
||||
/*
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
|
||||
import { resultMessage } from './result_message.js';
|
||||
import { PLGNTLS_fetch } from '../../utils/plgntls_fetch.js';
|
||||
|
||||
/*
|
||||
* @see https://developer.paypal.com/docs/checkout/standard/integrate/#link-integratebackend
|
||||
|
||||
@@ -1,13 +0,0 @@
|
||||
|
||||
//function PLGNTLS_fetch(url, options = {}) {
|
||||
export function PLGNTLS_fetch(url, options = {}) {
|
||||
console.log("inside PLGNTLS_fetch");
|
||||
url = PLGNTLS_data.fetch_url + url;
|
||||
|
||||
options.headers = options.headers || {};
|
||||
options.headers['X-WP-Nonce'] = PLGNTLS_data.fetch_nonce,
|
||||
console.log("options:", options);
|
||||
|
||||
return fetch(url, options);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user