From c72c97f8218dcbb54d612f64a5eddf512c7430e3 Mon Sep 17 00:00:00 2001
From: Philipp Stracker
Date: Wed, 4 Sep 2024 15:06:50 +0200
Subject: [PATCH] =?UTF-8?q?=E2=99=BB=EF=B8=8F=20Rename=20a=20function?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
modules/ppcp-axo/resources/js/AxoManager.js | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/modules/ppcp-axo/resources/js/AxoManager.js b/modules/ppcp-axo/resources/js/AxoManager.js
index f71fc595e..be8d2beac 100644
--- a/modules/ppcp-axo/resources/js/AxoManager.js
+++ b/modules/ppcp-axo/resources/js/AxoManager.js
@@ -27,9 +27,10 @@ class AxoManager {
ppcpConfig = null;
$ = null;
+ fastlane = null;
+
initialized = false;
hideGatewaySelection = false;
- fastlane = null;
phoneNumber = null;
/**
@@ -497,7 +498,7 @@ class AxoManager {
this.initPlacements();
this.initFastlane();
this.setStatus( 'active', true );
- this.setPhoneFromWoo();
+ this.readPhoneFromWoo();
log( `Attempt on activation - emailInput: ${ this.emailInput.value }` );
log(
@@ -759,7 +760,7 @@ class AxoManager {
*
* @return {boolean} True, if the internal phone number was updated.
*/
- setPhoneFromWoo() {
+ readPhoneFromWoo() {
if ( ! this.phoneInput ) {
return false;
}
@@ -818,7 +819,7 @@ class AxoManager {
this.data.email = this.emailInput.value;
this.billingView.setData( this.data );
- this.setPhoneFromWoo();
+ this.readPhoneFromWoo();
if ( ! this.fastlane.identity ) {
log( 'Not initialized.' );
@@ -851,7 +852,7 @@ class AxoManager {
* @return {Promise}
*/
async onChangePhone() {
- const hasChanged = this.setPhoneFromWoo();
+ const hasChanged = this.readPhoneFromWoo();
if ( hasChanged && this.status.active ) {
await this.refreshFastlaneComponent();