mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-08-30 05:00:51 +08:00
Fix stringify objects
This commit is contained in:
parent
1524d03ba2
commit
b3ffa1030d
3 changed files with 9 additions and 4 deletions
|
@ -212,7 +212,7 @@ class AxoManager {
|
|||
this.status.hasProfile
|
||||
);
|
||||
|
||||
log(`Scenario: ${scenario}`);
|
||||
log(`Scenario: ${JSON.stringify(scenario)}`);
|
||||
|
||||
// Reset some elements to a default status.
|
||||
this.el.watermarkContainer.hide();
|
||||
|
@ -374,7 +374,7 @@ class AxoManager {
|
|||
setStatus(key, value) {
|
||||
this.status[key] = value;
|
||||
|
||||
log(`Status updated: ${JSON.parse(JSON.stringify(this.status))}`);
|
||||
log(`Status updated: ${JSON.stringify(this.status)}`);
|
||||
|
||||
document.dispatchEvent(new CustomEvent("axo_status_updated", {detail: this.status}));
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
export function log(message, level = 'info') {
|
||||
const endpoint = this.axoConfig?.ajax?.frontend_logger?.endpoint;
|
||||
const endpoint = window.wc_ppcp_axo?.ajax?.frontend_logger?.endpoint;
|
||||
if(!endpoint) {
|
||||
return;
|
||||
}
|
||||
|
@ -8,7 +8,7 @@ export function log(message, level = 'info') {
|
|||
method: 'POST',
|
||||
credentials: 'same-origin',
|
||||
body: JSON.stringify({
|
||||
nonce: this.axoConfig.ajax.frontend_logger.nonce,
|
||||
nonce: window.wc_ppcp_axo.ajax.frontend_logger.nonce,
|
||||
log: {
|
||||
message,
|
||||
level,
|
||||
|
|
|
@ -598,6 +598,11 @@ unbox-primitive@^1.0.2:
|
|||
has-symbols "^1.0.3"
|
||||
which-boxed-primitive "^1.0.2"
|
||||
|
||||
uuid@^9.0.1:
|
||||
version "9.0.1"
|
||||
resolved "https://registry.yarnpkg.com/uuid/-/uuid-9.0.1.tgz#e188d4c8853cc722220392c424cd637f32293f30"
|
||||
integrity sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==
|
||||
|
||||
validate-npm-package-license@^3.0.1:
|
||||
version "3.0.4"
|
||||
resolved "https://registry.yarnpkg.com/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz#fc91f6b9c7ba15c857f4cb2c5defeec39d4f410a"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue