When you’re developing a WordPress site locally or testing in staging, you’ll generally want to prevent the site from sending out emails to customers or users.
I’ve noticed that a number of other WordPress developers are fans of MailHog (great write up by Jonathan Christopher), but in many cases it’s easier if you don’t have to install anything additional on the server.
WooCommerce sites are made up of a complex set of integrated parts. There’s WordPress, WooCommerce itself, other third-party plugins, and a theme. Each of these components require frequent updates and has the potential to break critical functionality on your site. This is why it’s critical to have automated tests.
For a WooCommerce site I used to work with, we had a checklist of items we would manually run through after any major update:
Verify products on home page look correct and load
Test “Add to Cart” button
Test removing item from cart
Verify all product on /shop page look correct
Test complete checkout with Stripe for guest checkout
Test complete checkout with PayPal for guest checkout
Test complete checkout with Stripe with coupon for guest checkout
Needless to say, this took a lot of time. Thankfully, tests like this can all be automated using Ghost Inspector.
I haven’t found a solution for the Safari issue yet, but thought I’d share the method I’ve worked out for cross domain tracking with Mixpanel for the remaining browsers.
For the example, I’ll use domains a A.com and B.com. A.com is the primary website and B.com is a marketing website that refers traffic to A.com.
On domain A.com you’ll need to set up an URL that loads the tracking code when it’s called inside of an iframe. We can pass tracking data from B.com to the iframe using a query string, and an efficient method for passing that data is by base64 encoding an JSON object. Continue reading →
We use Mixpanel at Cratejoy to track a lot of user interactions across the sites. However, there was a lot of profile data we were storing (and paying for) that we weren’t actually doing much with. So, I decided to see if it was possible to back up this data locally, create re-import files (in case we ever needed it again), and then delete in bulk.
The JetPack plugin makes it easy to add share buttons to posts in WordPress. With a little custom code it’s also possible to track how often the share buttons are clicked and which URLs are being shared.