♻️ Rename a function

This commit is contained in:
Philipp Stracker 2024-09-04 15:06:50 +02:00
parent 9910164044
commit c72c97f821
No known key found for this signature in database

View file

@ -27,9 +27,10 @@ class AxoManager {
ppcpConfig = null; ppcpConfig = null;
$ = null; $ = null;
fastlane = null;
initialized = false; initialized = false;
hideGatewaySelection = false; hideGatewaySelection = false;
fastlane = null;
phoneNumber = null; phoneNumber = null;
/** /**
@ -497,7 +498,7 @@ class AxoManager {
this.initPlacements(); this.initPlacements();
this.initFastlane(); this.initFastlane();
this.setStatus( 'active', true ); this.setStatus( 'active', true );
this.setPhoneFromWoo(); this.readPhoneFromWoo();
log( `Attempt on activation - emailInput: ${ this.emailInput.value }` ); log( `Attempt on activation - emailInput: ${ this.emailInput.value }` );
log( log(
@ -759,7 +760,7 @@ class AxoManager {
* *
* @return {boolean} True, if the internal phone number was updated. * @return {boolean} True, if the internal phone number was updated.
*/ */
setPhoneFromWoo() { readPhoneFromWoo() {
if ( ! this.phoneInput ) { if ( ! this.phoneInput ) {
return false; return false;
} }
@ -818,7 +819,7 @@ class AxoManager {
this.data.email = this.emailInput.value; this.data.email = this.emailInput.value;
this.billingView.setData( this.data ); this.billingView.setData( this.data );
this.setPhoneFromWoo(); this.readPhoneFromWoo();
if ( ! this.fastlane.identity ) { if ( ! this.fastlane.identity ) {
log( 'Not initialized.' ); log( 'Not initialized.' );
@ -851,7 +852,7 @@ class AxoManager {
* @return {Promise<void>} * @return {Promise<void>}
*/ */
async onChangePhone() { async onChangePhone() {
const hasChanged = this.setPhoneFromWoo(); const hasChanged = this.readPhoneFromWoo();
if ( hasChanged && this.status.active ) { if ( hasChanged && this.status.active ) {
await this.refreshFastlaneComponent(); await this.refreshFastlaneComponent();