The page was a classic WordPress page, and I recently converted it to a block. I added a custom code block, pasted the PayPal code, previewed the page (it worked), saved the page, and then got the message
This block contains unexpected or invalid content.
What am I doing wrong? Or is there an easier way to have a simple PayPal donation button using the block editor?
Thank you.
WordPressPayPal
Last Comment
Lev Seltzer
8/22/2022 - Mon
David Favor
Provide the URL of the actual page, so entire page can be analyzed.
Likely something in surrounding HTML requires some refinement, as code you provided (what little there is) appears correct.
I did the exact same thing not too long ago thinking code block was HTML and what it really means is displaying code. You need to add custom html.
1) Add your block 2) Use Custom HTML. Go to Browse All then find Custom HTML You can also just search for Custom HTML 3) Now you can paste in your HTMLfrom Paypal 4) Previewing shows it works
I just looked at your link and your Paypal link is working as it should.
Lev Seltzer
ASKER
After saving the page successfully, I return to the page and see the error message below. The block is missing the PayPal button code.
If you know how to avoid this error, then please help.. Or perhaps somewhere there is a PayPal block that securely stores the unique identifier for the button?
Likely something in surrounding HTML requires some refinement, as code you provided (what little there is) appears correct.