Add title, description and gatewayId to express payment

This commit is contained in:
Alex Florisca 2024-09-04 12:27:22 +01:00
parent 1707d6c3cc
commit 2e974488f0
5 changed files with 21125 additions and 0 deletions

View file

@ -3,6 +3,7 @@ import {
registerExpressPaymentMethod,
registerPaymentMethod,
} from '@woocommerce/blocks-registry';
import { __ } from '@wordpress/i18n';
import {
mergeWcAddress,
paypalAddressToWc,
@ -774,6 +775,9 @@ if ( block_enabled && config.enabled ) {
] ) {
registerExpressPaymentMethod( {
name: `${ config.id }-${ fundingSource }`,
title: 'PayPal',
description: __( 'Eligible users will see the PayPal button.' ),
gatewayId: 'ppcp-gateway',
paymentMethodId: config.id,
label: (
<div dangerouslySetInnerHTML={ { __html: config.title } } />