WooCommerce Square payment fields not allowing input

It’s a bit of a problem if your online store won’t accept payments! I’d been getting reports of a problem processing credit card payments on my site (www.thestudybuddy.com). There was no issue with PayPal. But my credit/debit card handler – Square – was the issue. The site is self-hosted on AWS Lightsail with bitnami.

The problem presented itself as users not being able to click into the fields to add their card details.

What I tried first

I had read that this might be a javascript conflict. I worked my way through all of the various plugins on the site and a different theme, but all with the same result. No change.

I don’t have a caching plugin running at the moment although I had used Hummingbird in the past to check performance. So I reactivated and cleared the cache, returned everything to pre-installation settings, cleared the cache again and deactivated.

I looked through the Chrome dev console to see if I could identify the errors. There were a few fails around trying to read script files – couldn’t fetch and similar. Mostly these seemed to be in core WordPress wp-includes files. I replaced the folders directly via FTP. Again no improvement. While I was there I also deleted a number of the plugins that I wasn’t using.

It’s been a long day by this point!

The solution

Part of the console errors showed that the scripts had a curious ‘pagespeed’ element in the file path. I don’t have any plugins doing that. But reading around I found out that bitnami might have its own page speed thing going on. This would have the effect of creating its own cache. So I needed to clear it. I found the relevant page on the bitnami site and di this:

  • Access theĀ instance via Lightsail console
  • paste sudo touch /opt/bitnami/apache2/var/cache/mod_pagespeed/cache.flush to clear the cache
  • then paste sudo /opt/bitnami/ctlscript.sh restart apache to restart apache.

This did the job for me. I’m a bit nervous about firing up any of the old plugins and obviously a little put out that I will have to do this every now and again. But, at least it has done the trick and payments are now coming back in.

You may also like...

Leave a Reply

Your email address will not be published.