Archive | PHP RSS feed for this section

s2member logo

How to store billing address information from the s2member plugin

s2member, the membership plugin we use on Smart Insights, doesn’t store the billing address entered when people purchase memberships or products. I needed a way to be able to get access to that information, and here’s the solution I figured out. Why doesn’t s2member store billing address information? Storing cardholder data such as billing address […]

Continue Reading Comments { 0 }
OSX Mavericks

Fixing PHPStorm after an OSX Mavericks update

I use PHPStorm for all my development – it’s a robust and very featured IDE that has got even better recently since version 7 was released. As such it’s the application I spend a large percentage of my working day in, and therefore typical that it’s the source of another issue with OSX Mavericks after […]

Continue Reading Comments { 4 }
OSX Mavericks

Fixing Vagrant after an OSX Mavericks update

Being too eager, as I generally am, I went straight ahead and updated to OSX Mavericks when it launched yesterday, and it broke my development environment. So how do you go about fixing Vagrant after an OSX Mavericks update?   Updated: 30th October – issues with starting VM on computer restart  Updated: 5th November – […]

Continue Reading Comments { 30 }
Google Universal Analytics

Implementing Google Universal Analytics Measurement Protocol in PHP and WordPress

I’ve had some historic difficulty in being able to track ecommerce transactions in Google Analytics that happen ‘behind the scenes’ of the Smart Insights site – typically when PayPal sends an IPN message, server to server, for a subscription renewal in our case. Since those messages don’t touch the browser, you can’t use the Google […]

Continue Reading Comments { 19 }
WordPress memory

How to monitor and reduce WordPress memory usage by plugins

One of the best things about WordPress is that it’s so easy to extend your site’s functionality with the many (mostly) free plugins available on the plugin repository. But loading your site with too many plugins can cause your site to consume too many resources on your server, slowing your site down. So how do you […]

Continue Reading Comments { 14 }

Increasing the PHP timeout on NGINX for WordPress

I’ve been using a Vagrant development set up for a while now, which has introduced me to NGINX after always using Apache in the past. The transition has been fine in the main, though I had an issue yesterday with PHP scripts timing out on me, so needed to figure out how to extend the […]

Continue Reading Comments { 1 }

Code snippet – strip links from string in PHP

Ever wanted to quickly and easily strip links from a string in PHP, but don’t want to use strip_tags because it forces you to manually specify every tag you want to keep, and not letting you tell it which ones to strip? The other day while doing some PHP development I had an issue with a […]

Continue Reading Comments { 1 }