mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-05 08:59:14 +08:00
🚧 Extend class from PaymentButton base
This commit is contained in:
parent
3430ccc01a
commit
096aa4fc53
1 changed files with 7 additions and 6 deletions
|
@ -9,6 +9,8 @@ import FormValidator from '../../../ppcp-button/resources/js/modules/Helper/Form
|
|||
import ErrorHandler from '../../../ppcp-button/resources/js/modules/ErrorHandler';
|
||||
import widgetBuilder from '../../../ppcp-button/resources/js/modules/Renderer/WidgetBuilder';
|
||||
import { apmButtonsInit } from '../../../ppcp-button/resources/js/modules/Helper/ApmButtons';
|
||||
import PaymentButton from '../../../ppcp-button/resources/js/modules/Renderer/PaymentButton';
|
||||
import { PaymentMethods } from '../../../ppcp-button/resources/js/modules/Helper/CheckoutMethodState';
|
||||
|
||||
/**
|
||||
* Plugin-specific styling.
|
||||
|
@ -57,14 +59,13 @@ const CONTEXT = {
|
|||
* On a single page, multiple Apple Pay buttons can be displayed, which also means multiple
|
||||
* ApplePayButton instances exist. A typical case is on the product page, where one Apple Pay button
|
||||
* is located inside the minicart-popup, and another pay-now button is in the product context.
|
||||
*
|
||||
* TODO - extend from PaymentButton (same as we do in GooglepayButton.js)
|
||||
*/
|
||||
class ApplePayButton {
|
||||
class ApplePayButton extends PaymentButton {
|
||||
/**
|
||||
* Whether the payment button is initialized.
|
||||
*
|
||||
* @type {boolean}
|
||||
* @inheritDoc
|
||||
*/
|
||||
static methodId = PaymentMethods.APPLEPAY;
|
||||
|
||||
*/
|
||||
#isInitialized = false;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue