Remove console logs

This commit is contained in:
Pedro Silva 2024-04-15 17:38:23 +01:00
parent 5eb39de540
commit 2e6f403ed1
No known key found for this signature in database
GPG key ID: E2EE20C0669D24B3
3 changed files with 3 additions and 18 deletions

View file

@ -119,8 +119,6 @@ class AxoManager {
if (this.status.hasProfile) {
const { selectionChanged, selectedAddress } = await this.fastlane.profile.showShippingAddressSelector();
//console.log('selectedAddress', selectedAddress);
if (selectionChanged) {
this.setShipping(selectedAddress);
this.shippingView.refresh();
@ -139,12 +137,7 @@ class AxoManager {
this.el.changeCardLink.on('click', async () => {
const response = await this.fastlane.profile.showCardSelector();
//console.log('card response', response);
if (response.selectionChanged) {
//console.log('response.selectedCard.paymentToken', response.selectedCard.paymentToken);
this.setCard(response.selectedCard);
this.setBilling({
address: response.selectedCard.paymentSource.card.billingAddress
@ -544,8 +537,6 @@ class AxoManager {
});
this.setCard(authResponse.profileData.card);
//console.log('authResponse', authResponse);
this.setStatus('validEmail', true);
this.setStatus('hasProfile', true);
@ -567,8 +558,6 @@ class AxoManager {
this.setStatus('validEmail', true);
this.setStatus('hasProfile', false);
//console.log('this.cardComponentData()', this.cardComponentData());
this.cardComponent = await this.fastlane
.FastlaneCardComponent(
this.cardComponentData()
@ -678,8 +667,9 @@ class AxoManager {
// Ryan flow.
const form = document.querySelector('form.woocommerce-checkout');
const formData = new FormData(form);
const submitContainerSelector = '.woocommerce-checkout-payment';
disable('.woocommerce-checkout-payment');
disable(submitContainerSelector);
// Fill in form data.
Object.keys(data).forEach((key) => {
@ -698,7 +688,7 @@ class AxoManager {
})
.catch(error => {
console.error('Error:', error);
enable('.woocommerce-checkout-payment');
enable(submitContainerSelector);
});
} else {

View file

@ -110,7 +110,6 @@ class FormFieldGroup {
}
inputElement(name) {
console.log('inputElement', name);
const baseSelector = this.fields[name].selector;
const select = document.querySelector(baseSelector + ' select');

View file

@ -15,11 +15,9 @@ class Fastlane {
window.paypal.Fastlane(config)
.then((result) => {
this.init(result);
console.log('[AXO] Connected', result);
resolve();
})
.catch((error) => {
console.error('[AXO] Failed to connect', error);
reject();
});
});
@ -32,8 +30,6 @@ class Fastlane {
this.FastlaneCardComponent = this.connection.FastlaneCardComponent;
this.FastlanePaymentComponent = this.connection.FastlanePaymentComponent;
this.FastlaneWatermarkComponent = this.connection.FastlaneWatermarkComponent
console.log('[AXO] Fastlane initialized', this);
}
setLocale(locale) {