mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-06 09:08:09 +08:00
🔥 Remove unused getter
This commit is contained in:
parent
966b76102c
commit
5a870de4f4
1 changed files with 0 additions and 30 deletions
|
@ -552,36 +552,6 @@ export default class PaymentButton {
|
||||||
return this.wrapperElement instanceof HTMLElement;
|
return this.wrapperElement instanceof HTMLElement;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns an array of HTMLElements that belong to the payment button.
|
|
||||||
*
|
|
||||||
* @readonly
|
|
||||||
* @return {HTMLElement[]} List of payment button wrapper elements.
|
|
||||||
*/
|
|
||||||
get allElements() {
|
|
||||||
const selectors = [];
|
|
||||||
|
|
||||||
// Payment button (Pay now, smart button block)
|
|
||||||
selectors.push( `#${ this.wrapperId }` );
|
|
||||||
|
|
||||||
// Block Checkout: Express checkout button.
|
|
||||||
if ( PaymentContext.Blocks.includes( this.context ) ) {
|
|
||||||
selectors.push( `#${ this.wrappers.Block }` );
|
|
||||||
}
|
|
||||||
|
|
||||||
// Classic Checkout: Separate gateway.
|
|
||||||
if ( this.isSeparateGateway ) {
|
|
||||||
selectors.push(
|
|
||||||
`.wc_payment_method.payment_method_${ this.methodId }`
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
this.log( 'Wrapper Elements:', selectors );
|
|
||||||
return /** @type {HTMLElement[]} */ selectors.flatMap( ( selector ) =>
|
|
||||||
Array.from( document.querySelectorAll( selector ) )
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Checks, if the payment button is still attached to the DOM.
|
* Checks, if the payment button is still attached to the DOM.
|
||||||
*
|
*
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue