mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-08-31 06:52:50 +08:00
Merge pull request #2570 from woocommerce/PCP-3535-fix-editor-paypal-buttons-grid
Do not add pay later button in editor (3535)
This commit is contained in:
commit
4457dfed12
1 changed files with 6 additions and 3 deletions
|
@ -688,7 +688,7 @@ const PayPalComponent = ( {
|
|||
);
|
||||
};
|
||||
|
||||
const BlockEditorPayPalComponent = () => {
|
||||
const BlockEditorPayPalComponent = ({ fundingSource } ) => {
|
||||
const urlParams = {
|
||||
clientId: 'test',
|
||||
...config.scriptData.url_params,
|
||||
|
@ -701,6 +701,7 @@ const BlockEditorPayPalComponent = () => {
|
|||
onClick={ ( data, actions ) => {
|
||||
return false;
|
||||
} }
|
||||
fundingSource={ fundingSource }
|
||||
/>
|
||||
</PayPalScriptProvider>
|
||||
);
|
||||
|
@ -786,7 +787,7 @@ if ( block_enabled ) {
|
|||
name: config.id,
|
||||
label: <div dangerouslySetInnerHTML={ { __html: config.title } } />,
|
||||
content: <PayPalComponent isEditing={ false } />,
|
||||
edit: <BlockEditorPayPalComponent />,
|
||||
edit: <BlockEditorPayPalComponent fundingSource={ 'paypal' }/>,
|
||||
ariaLabel: config.title,
|
||||
canMakePayment: () => {
|
||||
return true;
|
||||
|
@ -818,7 +819,9 @@ if ( block_enabled ) {
|
|||
fundingSource={ fundingSource }
|
||||
/>
|
||||
),
|
||||
edit: <BlockEditorPayPalComponent />,
|
||||
edit: <BlockEditorPayPalComponent
|
||||
fundingSource={ fundingSource }
|
||||
/>,
|
||||
ariaLabel: config.title,
|
||||
canMakePayment: async () => {
|
||||
if ( ! paypalScriptPromise ) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue