mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-08-30 05:00:51 +08:00
Add title, description and gatewayId to express payment
This commit is contained in:
parent
1707d6c3cc
commit
2e974488f0
5 changed files with 21125 additions and 0 deletions
|
@ -19,6 +19,7 @@
|
|||
"@babel/core": "^7.19",
|
||||
"@babel/preset-env": "^7.19",
|
||||
"@babel/preset-react": "^7.18.6",
|
||||
"@wordpress/i18n": "^5.6.0",
|
||||
"@woocommerce/dependency-extraction-webpack-plugin": "2.2.0",
|
||||
"babel-loader": "^8.2",
|
||||
"cross-env": "^7.0.3",
|
||||
|
|
|
@ -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 } } />
|
||||
|
|
|
@ -17,6 +17,7 @@
|
|||
"@babel/core": "^7.19",
|
||||
"@babel/preset-env": "^7.19",
|
||||
"@babel/preset-react": "^7.18.6",
|
||||
"@wordpress/i18n": "^5.6.0",
|
||||
"@woocommerce/dependency-extraction-webpack-plugin": "^2.2.0",
|
||||
"babel-loader": "^8.2",
|
||||
"cross-env": "^7.0.3",
|
||||
|
|
|
@ -3,6 +3,7 @@ import {
|
|||
registerExpressPaymentMethod,
|
||||
registerPaymentMethod,
|
||||
} from '@woocommerce/blocks-registry';
|
||||
import __ from '@wordpress/i18n';
|
||||
import { loadPaypalScript } from '../../../ppcp-button/resources/js/modules/Helper/ScriptLoading';
|
||||
import GooglepayManager from './GooglepayManager';
|
||||
import { loadCustomScript } from '@paypal/paypal-js';
|
||||
|
@ -58,6 +59,9 @@ const features = [ 'products' ];
|
|||
|
||||
registerExpressPaymentMethod( {
|
||||
name: buttonData.id,
|
||||
title: `PayPal - ${ buttonData.title }`,
|
||||
description: __( 'Eligible users will see the PayPal button.' ),
|
||||
gatewayId: 'ppcp-gateway',
|
||||
label: <div dangerouslySetInnerHTML={ { __html: buttonData.title } } />,
|
||||
content: <GooglePayComponent isEditing={ false } />,
|
||||
edit: <GooglePayComponent isEditing={ true } />,
|
||||
|
|
21115
package-lock.json
generated
Normal file
21115
package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue