diff --git a/modules/ppcp-applepay/resources/js/ApplepayButton.js b/modules/ppcp-applepay/resources/js/ApplepayButton.js index b5a3d770b..f79d347c0 100644 --- a/modules/ppcp-applepay/resources/js/ApplepayButton.js +++ b/modules/ppcp-applepay/resources/js/ApplepayButton.js @@ -94,8 +94,6 @@ class ApplePayButton extends PaymentButton { initialPaymentRequest = null; constructor( context, externalHandler, buttonConfig, ppcpConfig ) { - this._initDebug( !! buttonConfig?.is_debug ); - apmButtonsInit( ppcpConfig ); this.context = context; @@ -112,34 +110,6 @@ class ApplePayButton extends PaymentButton { this.refreshContextData(); } - /** - * NOOP log function to avoid errors when debugging is disabled. - */ - log() {} - - /** - * Enables debugging tools, when the button's is_debug flag is set. - * - * @param {boolean} enableDebugging If debugging features should be enabled for this instance. - * @private - */ - _initDebug( enableDebugging ) { - if ( ! enableDebugging || this.#isInitialized ) { - return; - } - - document.ppcpApplepayButtons = document.ppcpApplepayButtons || {}; - document.ppcpApplepayButtons[ this.context ] = this; - - this.log = ( ...args ) => { - console.log( `[ApplePayButton | ${ this.context }]`, ...args ); - }; - - jQuery( document ).on( 'ppcp-applepay-debug', () => { - this.log( this ); - } ); - } - /** * The nonce for ajax requests. *