Importing WordPress data with the strategy pattern
A client needed to import users from a clean CSV and a messy pipe-delimited file. The strategy pattern kept the importer clean instead of a tangle of if/else blocks.
A client needed to import users from a clean CSV and a messy pipe-delimited file. The strategy pattern kept the importer clean instead of a tangle of if/else blocks.
A WooCommerce sales widget kept timing out because it stacked nested foreach loops. Swapping them for array_filter, array_map, and array_reduce made the code fast and readable.
Editing one English button label broke the German, French, and Spanish translations. Using stable keys as placeholders, plus an en_US fallback, keeps that from happening.
A one-line shipping tweak would have broken inventory reporting and a homepage shortcode. Tight coupling and low cohesion are why, and here’s how to structure the code instead.
I was working on a WooCommerce plugin for a client to sync their product inventory with a third-party API. Total classic scenario. The problem was,…
I got a call from a client running a pretty complex WooCommerce store. Their shipping logic was a mess. They had all these rules for…
Got a call from a client last week. They’ve got a WooCommerce extension that’s starting to get popular, but its settings page was buried under…
Got a call from a long-time client last week. Absolute panic. They’d just run a routine batch of plugin updates, and suddenly their shipping calculator…
I got a call from a client running a decent-sized WooCommerce shop. They were in a panic. Their main shop page, which should have been…
Had a client call last week. They’ve got this huge, old WooCommerce plugin that’s been passed through three different dev teams. A new junior dev…