Skip to content

Commit 2f8ddb7

Browse files
committed
Remove console logs
1 parent 08a1072 commit 2f8ddb7

File tree

2 files changed

+0
-16
lines changed

2 files changed

+0
-16
lines changed

modules/ppcp-button/resources/js/modules/ActionHandler/CheckoutActionHandler.js

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@ class CheckoutActionHandler {
5050
configuration() {
5151
const spinner = this.spinner;
5252
const createOrder = ( data, actions ) => {
53-
console.log( 'creating the order' );
5453
const payer = payerData();
5554
const bnCode =
5655
typeof this.config.bn_codes[ this.config.context ] !==
@@ -104,10 +103,6 @@ class CheckoutActionHandler {
104103
} )
105104
.then( function ( data ) {
106105
if ( ! data.success ) {
107-
console.log(
108-
'something went wrong creating the order',
109-
data
110-
);
111106
spinner.unblock();
112107
//handle both messages sent from Woocommerce (data.messages) and this plugin (data.data.message)
113108
if ( typeof data.messages !== 'undefined' ) {
@@ -157,9 +152,6 @@ class CheckoutActionHandler {
157152
input.setAttribute( 'name', 'ppcp-resume-order' );
158153
input.setAttribute( 'value', data.data.custom_id );
159154
document.querySelector( formSelector ).appendChild( input );
160-
161-
console.log( 'returning order id: ' );
162-
163155
return data.data.id;
164156
} );
165157
};

modules/ppcp-button/resources/js/modules/OnApproveHandler/onApproveForPayNow.js

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
const onApprove = ( context, errorHandler, spinner ) => {
22
return ( data, actions ) => {
3-
console.log( 'capturing order...' );
4-
53
spinner.block();
64
errorHandler.clear();
75

@@ -23,10 +21,6 @@ const onApprove = ( context, errorHandler, spinner ) => {
2321
.then( ( data ) => {
2422
spinner.unblock();
2523
if ( ! data.success ) {
26-
console.error(
27-
'something went wrong capturing the order',
28-
data
29-
);
3024
if ( data.data.code === 100 ) {
3125
errorHandler.message( data.data.message );
3226
} else {
@@ -40,8 +34,6 @@ const onApprove = ( context, errorHandler, spinner ) => {
4034
}
4135
throw new Error( data.data.message );
4236
}
43-
44-
console.log( 'order captured correctly' );
4537
document.querySelector( '#place_order' ).click();
4638
} );
4739
};

0 commit comments

Comments
 (0)