mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-05 08:59:14 +08:00
🎨 Minor code structure changes
This commit is contained in:
parent
aa9c02a786
commit
cea292684b
4 changed files with 8 additions and 8 deletions
|
@ -51,7 +51,7 @@ class ApplePayPreviewButtonManager extends PreviewButtonManager {
|
|||
* @param {string} wrapperId - CSS ID of the wrapper element.
|
||||
* @return {ApplePayPreviewButton}
|
||||
*/
|
||||
createButtonInst(wrapperId) {
|
||||
createButtonInstance(wrapperId) {
|
||||
return new ApplePayPreviewButton({
|
||||
selector: wrapperId,
|
||||
apiConfig: this.apiConfig
|
||||
|
|
|
@ -59,8 +59,8 @@ class PreviewButtonManager {
|
|||
* @param {string} wrapperId - CSS ID of the wrapper element.
|
||||
* @return {PreviewButton}
|
||||
*/
|
||||
createButtonInst(wrapperId) {
|
||||
throw new Error('The "createButtonInst" method must be implemented by the derived class');
|
||||
createButtonInstance(wrapperId) {
|
||||
throw new Error('The "createButtonInstance" method must be implemented by the derived class');
|
||||
}
|
||||
|
||||
registerEventListeners() {
|
||||
|
@ -183,7 +183,7 @@ class PreviewButtonManager {
|
|||
#addButton(id, ppcpConfig) {
|
||||
const createButton = () => {
|
||||
if (!this.buttons[id]) {
|
||||
this.buttons[id] = this.createButtonInst(id).setButtonConfig(this.buttonConfig);
|
||||
this.buttons[id] = this.createButtonInstance(id).setButtonConfig(this.buttonConfig);
|
||||
}
|
||||
|
||||
this.#configureButton(id, ppcpConfig);
|
||||
|
|
|
@ -51,7 +51,7 @@ class GooglePayPreviewButtonManager extends PreviewButtonManager {
|
|||
* @param {string} wrapperId - CSS ID of the wrapper element.
|
||||
* @return {GooglePayPreviewButton}
|
||||
*/
|
||||
createButtonInst(wrapperId) {
|
||||
createButtonInstance(wrapperId) {
|
||||
return new GooglePayPreviewButton({
|
||||
selector: wrapperId,
|
||||
apiConfig: this.apiConfig
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue