Migrate the PayPal buttons inside of the Express Checkout in the editor to @paypal/react-paypal-js with a unique namespace to avoid conflicts with the Pay Later messaging block

This commit is contained in:
Daniel Dudzic 2024-03-29 13:59:35 +01:00
parent 8b4594ad92
commit 40e8aa2874
No known key found for this signature in database
GPG key ID: 31B40D33E3465483
4 changed files with 62 additions and 5 deletions

View file

@ -90,13 +90,12 @@ export default function Edit( { attributes, clientId, setAttributes } ) {
return (<div {...props}><Spinner/></div>)
}
const urlParams = scriptParams === false ? {
const urlParams = {
clientId: 'test',
components: 'messages',
} : {
...scriptParams.url_params,
...{
components: 'messages',
dataNamespace: 'ppcp-block-editor-paylater-message',
}
}