Category: Development
-
Add Extra Columns to WooCommerce Reports
It’s possible you’ve followed this tutorial from Woo on how to add columns to admin reports, such as the Orders report. And it’s possible you’ve found that it just doesn’t really work as advertised and is incredibly convoluted. Specifically, the Javascript filter callback you register (addFilter) is just…never called. Me too. Here’s something that actually…
-
Installing Premium WordPress Plugins with Composer
If you’ve Google’d how to install or update premium plugins, like Advanced Custom Fields or Gravity Forms, with Composer, you’ve probably found solutions that want you to configure package data locally. Examples include this tutorial from Roots and this library on GitHub. The problem with these solutions is that they require defining the plugin version…
-
Handle Multiple reCAPTCHA’s on the Same Page
reCAPTCHA’s default configuration hijacks pretty much everything about form submission. So anything you want to do with the form, such as validation, will need to be fired in the configured callback function, rather than on the traditional submit event. This is pretty simple for most scenarios because you can use the form’s HTML ID to…
-
Package Peak for Installing ThemeForest Themes and CodeCanyon Plugins with Composer
Here at Sterner Stuff, we’re big fans of Bedrock. It allows us to manage our WordPress dependencies via Composer, and keep our Git repositories clean. One of the biggest Bedrock caveats is how to get your premium plugins into your WordPress site. You can always commit them into version control, but that’s awfully messy. Some…
-
Configure Klaviyo Back-in-Stock Notifications for Shopify Dawn
Klaviyo is an email marketing platform with a strong Shopify integration. Of the many features it offers, including personalized recommended products in email campaigns and customer behavior tracking, it can be set up to allow customers to sign up to know when a product on your Shopify store is coming back in stock. Out of…
-
WooCommerce Foreign Key Errors and MySQL Engines
Here at Sterner Stuff, we don’t like throwing away existing websites and content. We call that stuff “equity”, and no one wants to throw away equity. When possible, we’ll repurpose as much of a WordPress site as possible when implementing a new design, features, etc. So while it may seem like a brand new site,…
-
Configuring WP fail2ban Behind Cloudflare
If your WordPress website is proxied behind Cloudflare, the IP address reported to your server isn’t the actual IP address of the original request. It’s a Cloudflare IP. Most of the time, this doesn’t matter, but if you’re using WP fail2ban, this causes issues. The Problem By default, fail2ban in combination with WP fail2ban works…
-
Configure wkhtmltopdf for Laravel Snappy on Homestead, Sail, Forge
Laravel Snappy depends on wkhtmltopdf, and the Composer wrappers are outdated. Here’s how to get set up with the latest version.
-
Keep MySQL Databases During Laravel Homestead Upgrade
This question has been documented about a million places around the internet with a variety of convoluted answers. How can we upgrade Laravel Homestead without losing our MySQL databases? Instead of writing your own mysqldump commands, or copying and pasting one from an internet stranger, there’s actually functionality for this built right into Homestead. If…
-
Google’s Core Web Vitals and Organic Search Ranking
Google is rolling out a new set of metrics designed to evaluate the performance of websites across the internet. How your site performs, according to these metrics, will directly impact your website’s organic search engine results page (SERP) ranking – that is, how close to the top of Google you are. Site speed has always…
-
Semantic Versioning for WordPress
One of the biggest struggles facing both the maintainers of WordPress and individuals tasked with maintaining WordPress sites is updates. Running updates often gets ignored by non-technical users afraid of breaking things, and the WordPress core team is doing everything they can to mitigate the security risks involved with not updating. If you don’t install…
-
Remove WordPress Actions with Object-Bound Callbacks
Often, it’s very simple to disable a filter or action in WordPress. Core’s adherence, merit notwithstanding, to working in the global namespace meant many plugins and themes followed suit. So unhooking a function was as simple as: But as PHP has matured, plugin and theme authors are more often using modern structures and practices, like…