End-to-End Tests For WordPress Plugins

End-to-End Tests For WordPress Plugins

Over the holidays in 2022, I refactored a lot of the code for Secret Santa Hat. After seeing hundreds of new groups being created each day, I realized it was no longer a simple pet project. No longer could I just push development code directly to production. The project needed to mature.

So, I added some QA processes to ensure that anything deployed live is functional. This gave me the opportunity to really deep-dive end-to-end(E2E) tests and put them in place. I’ve learned a lot, and I see the huge value this can add to my work as a WordPress developer by adding E2E tests to the plugins I build for clients.

(more…)

WordPress – Determining When a Plugin or Theme is Updated

WordPress - Do Something When A Plugin or Theme Updates

Recently, I was faced with an unavoidable situation where I had to alter a third-party plugin’s code. The plugin is one I consider a “well-made” plugin, incorporating apply_filters or do_action all over the place. However, the hooks weren’t available in a specific spot where I needed them for a project.

Of course, the downside of altering third-party plugin or theme code is maintainability. Every time the plugin or theme releases an update, the custom code must be reintegrated manually once the upgrades are complete. So, tracking when a plugin or theme is updated becomes important.

(more…)

Creative Filtering in “WP WooCommerce Mailchimp” Plugin

Creative Filtering In WordPress Plugins

I’ve went on and on about “well-built” plugins for WordPress. As much as I’d like plugins to “filter all the things”, in reality, they never account for all use cases. One such challenge I had recently involved the WP WooCommerce Mailchimp plugin.

(more…)

Games Done Quick-Inspired Donation Total

SGDQ 2019 Donation Tracker Re-Creation

Twice a year, gamers from all over the world come together to “speedrun” both new and old games alike. Games from every platform and every era. Even better, it’s a week-long marathon to raise money for charity, and it’s streamed live on Twitch for millions to follow along. Although I’m not a big gamer, I’ve been watching both Awesome Games Done Quick(AGDQ) and Summer Games Done Quick(SGDQ) for about five years now.

Each marathon gets better. More games, larger sponsors, more money raised, and, finally, better production quality. The SGDQ that just finished raised over $3 Million for Doctors Without Borders, and the production and organization is top-notch.1If you can’t watch the whole SGDQ 2019, at least watch the last few hours. The grand finale run of Chrono Trigger ended up smashing the total-money-raised record for any GDQ and was just insane. Specifically, I was impressed with the donation tracker.

(more…)

Local WordPress Development – How To Sync Content From Staging or Production

Local WordPress Development - How To Sync Uploads And Database From A Staging or Production Site

Given that WordPress is still growing1WP is about a third of the web now, as of April 2019, there’s no shortage of work for proper WordPress developers. In my case, work comes from several sources, all of it freelance. The vast majority of work I do is retainer. Agencies/companies need me to come into a sprint, usually for the stuff that’s a bit too much for juniors.

Since every project is different, the workflow is usually unique as well. Unless I’m involved with the engineering at project kick-off, I usually have to adapt to what’s been put in place by other developers. Typically that means writing custom shell scripts and aliases to help sync both code and content.

(more…)

Contact Form 7: Salesforce Integration

WordPress Contact Form 7 Salesforce Integration

Here’s another forms use-case for WordPress. You have a form built with Contact Form 7, WP Forms, Gravity Forms, etc. However, when the form is submitted, you also want to send the form data to a third party, like Salesforce, SugarCRM, Marketo, etc. Luckily, the form plugins I mentioned allow us to “hook in” to the processing flow.

In this tutorial, I’ll show you a quick way to send Contact Form 7(CF7) submission data to Salesforce. We’ll be using some core WordPress functions to help with the integration. The code is pretty straightforward, so we’ll just put it in our child theme’s1You are using a child theme, right? functions.php file.

(more…)