troubleshooting Question

How do I add a PayPal button to a WordPress site using the block editor?

Avatar of Lev Seltzer
Lev SeltzerFlag for Israel asked on
7 Comments1 Solution15 ViewsLast Modified:
This seems like a ridiculous questions, but the obvious method is not working for me.My button code is as follows:
<form style="text-align: center;" action="" method="post"><input type="hidden" name="cmd" value="_s-xclick" />
<div class="wp-block-column"><!-- wp:html -->
<input type="hidden" name="hosted_button_id" value="S37XKJTFBJXT6" />    
<input type="image" src="" border="0" name="submit" title="PayPal - The safer, easier way to pay online!" alt="Donate with PayPal button" />    
<img alt="" border="0" src="" width="1" height="1" />    

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.
Join our community to see this answer!
Unlock 1 Answer and 7 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 7 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros