PayPal Buttons On Ghost

I have a client who was wanting bells and whistles for an ecom store and so I chose Squarespace however turns out because she does not want to give out her home address on paperwork/invoices etc, she cannot. I want to bring her back to Ghost. Do PayPal buttons work OK on Ghost’s Standard plan or do I need her on a a higher plan? Urgent please as needing to launch imminently.

Normal PayPal buttons are just HTML, as far as I am aware. These should work on all plans.

1 Like

Yip thanks. Support responded so good to go! So long Squarespace ;)

OK cannot get these to work. Need site live today.

I have the main part one script. Does it matter if it goes on the header or the post code injection? Then I have the part 2 code for where the botton goes. Should be simple.

Is there a problem adding this as a post. They work better there for site purposes and promotion.

Moved this shambles of a project from Squarespace to here hoping for some peace but now this.

Anyone anywhere, support, staff or otherwise, I need this working today. Site still under password. Any tips?

I have put ghost support ticket in but they dont work till tomorrow.

OK, so added to both buttons to a new test post and test page. You can see the buttons on preview fine, but they disappear when you set both the page and post live.

Why would that be?

Took out both header and footer code and not them.

So my update this am, while I await Ghost support. The buttons show on my iMac. But across 4/5 browsers, some I have not even used to view the site on my MacBook are not showing at all. Like why would this be?

I purged the cache on Cloudflare, restarted my computer yet swtill not showing.

They show on my mobile which is a bonus, but why not my MacBook and a friends MacBook too. She previously viewed the website on it.

Just so frustrating.

I recall vaguely another situation like this and I had to reboot my broadband router? Sadly as another family member is working I cannot do this till this evening … but will try if nothing else comes up.

I’m not sure anyone here is going to be able to help you without seeing the site or the code. So hopefully support will get you sorted today.

1 Like

I’m still waiting. Killing me as needed this live on Saturday, but no weekend support. Client is out and about and cannot see the paypal buttons on her mobile either. Argh!

Yeah, on all posts, both on desktop and mobile:

However, did some debugging. It only works when I have my adblocker on.
I then had a look at my console, where I saw loads of errors that certain scripts couldn’t be loaded. So I turned my adblocker off. Tada. PayPal buttons gone:

Notably, when the adblocker is turned off, this is my browser console:

 Initializing Smart Data Protector
castramon-cleugh-wood-walk-galloway-14-july-2025/:216 Uncaught ReferenceError: $ is not defined
    at castramon-cleugh-wood-walk-galloway-14-july-2025/:216:1
(anonymous) @ castramon-cleugh-wood-walk-galloway-14-july-2025/:216
castramon-cleugh-wood-walk-galloway-14-july-2025/:352 Uncaught TypeError: paypal.HostedButtons is not a function
    at castramon-cleugh-wood-walk-galloway-14-july-2025/:352:17
(anonymous) @ castramon-cleugh-wood-walk-galloway-14-july-2025/:352

Without looking into it in detail, I’d assume thet “Smart Data Protector” is interfering with the PayPal buttons. I’d start by looking into that.

Edit: just to confirm that theory, I just left the adblocker turned off and blocked the domain “usercentrics.eu” in the network tab of my developer tools. Refreshed the page and the PayPal buttons are back again.

So, it has nothing to do with Ghost, but with Usercentrics.

This is an absolute nightmare. I had this working on Squarespace with Usercentrics installed and it worked fine. They are a huge cookie notice provider. Are you telling me they are blocking all paypal buttons globally? I give up.

If so why can I see it on my mobile and iMac and not my Macbook? It’s random.

Is there any Ghost staff member here that can look into this and concur or otherwise. This is huge. Paypal buttons get blocked this way?

I’m no developer. Just a designer, well till today because I quit. This is nuts. I don’t know what to do with Smart Data Protector. Adding PayPal buttons to a website should not be this hard.

No. I have no idea how it works. All I am saying is that NOT loading the script makes the PayPal buttons work :smiley:

So, if you need both to work, I’d suggest reaching out to Usercentrics or looking into their configuration. Given that I can make everything work by simply disabling the Usercentrics script, the logical conclusion is that something in there is affecting the PayPal buttons.

Apple products are blocking third-party scripts pretty heavily, similar to my adblocker. Therefore, it would make sense that the PayPal buttons are working there.

This is not a Ghost issue. Ghost renders the HTML correctly (as portrayed by the correct PayPal buttons when the Usercentrics script is not loaded).

I’ve reached out to Termageddon who incorporate UC into their business model. Hopefully they can help. I appreciate and bow to your expertise in helping come up with the culprit.

I did think about using Stan Store yesterday while waiting … so maybe have to go there instead as I cannot gamble on blockers and UserCentrics working or not.

Thanks.

Edit. Appears the fix was in requiring a fresh scan of the website with Termageddon’s dashboard, which I’d not done as it was not yet live. The fresh scan accessed the Paypal service and a couple more has been setup as “essential” cookies. Meaning that regardless of a users decision to accept/decline cookies, those services will fire on the website as they are used for payment and security purposes.

I am still having difficulty viewing on on some browsers but it’s showing incognito, so a caching issue I need to conquer now. Then all should be well in the world. Fingers crossed.

Could not have done this without you @jannis :folded_hands:

1 Like

You might take a look at whether you can generate a PayPal link rather than button. A static link is less likely to run afoul of other blockers. Not sure if that fits your use case, but worth a try if it does.

1 Like

Indeed Cathy, you have a point. Might just have my client try that instead … Paypal buttons can be quite unsightly ;) xx

1 Like

Just picking up on the very reason you moved off Squarespace.

I’m not a full expert, but I believe having a physical mailing address is a regulatory requirement (CAN-SPAM Act (U.S.), GDPR (EU) etc), and not a Squarespace issue. Even when using Ghost, your client very likely needs to add a physical address in their communications.

I’d make sure they are aware of this and for the potential of fines etc…

Where exactly … because it does not show up in the footer of emails nor is it even requested by Ghost?!