mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-05 08:59:14 +08:00
🚧 Remove unused methods
This commit is contained in:
parent
096aa4fc53
commit
eef4c80a48
1 changed files with 0 additions and 30 deletions
|
@ -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.
|
||||
*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue