Technology
From Coding to Cooking: Practical Uses for ChatGPT
Six months ago, I started playing with ChatGPT, an AI developed by OpenAI. At first, it felt like being handed a high-tech gadget with a one-page manual—intriguing but a bit overwhelming. What was I supposed to do with it? Chat? Yet, as weeks morphed into months, I found that I was increasingly in conversation with…
Read MoreObsidian, the note-taker of my dreams
The backstory (Hate navel-gazing backstories? Just want the practical details? Feel free to skip to how I’m using Obsidian!) I’m one of those people who are always trying new systems, convinced that “all I need” to finally be on top of things is in the next system. Occasionally it’s even true, but usually takes a…
Read MoreWooCommerce Subscriptions unexpected value: INF
Short and sweet, because I got no Google results for my search: When calling WCS_Switch_Cart_Item::get_old_price_per_day(), I got back INF as a result. After tracking it down, it was because I had filtered wcs_switch_proration_days_in_old_cycle but had a bug that was resulting in no value being returned.
Read MoreAdding or updating a Gravity Forms license on WordPress Multisite
Recently when I went to update plugins on a WordPress Multisite install, I noticed Gravity Forms wouldn’t update and gave the following error message: This didn’t come as a surprise because I knew the license was expired. I had a new license number to activate, but it wasn’t immediately obvious where I could do that.…
Read MoreReact Query – Essentials course errata
I’m learning React Query, specifically by going through Tanner Linsley’s React Query – Essentials course on Teachable. I had heard that there are some version-related inconsistencies in the course, and sure enough, I’ve run into them. The associated repo is also out-of-date, so no help there. I’m documenting them here as I encounter them in…
Read MoreSorting posts by meta_value when they’re saved as an ACF serialized array
What I searched for “acf” sort by meta_value serialized Why I searched for it I’m using Advanced Custom Fields to let a site manager pick one or more US states to associate with each Chapter (a custom post type). I want to display the Chapters in a list sorted by the state in alphabetical order;…
Read MoreBuilding a // phpcs:ignore string for WordPress Coding Standards
I’ve been using PHP_CodeSniffer and the WordPress Coding Standards sniffs in Visual Studio Code to help me avoid issues and follow the standards. Occasionally, though, I’ll get an error from a sniff that is either over-vigorous or I can’t comply with for reasons outside of my control. A common case is when I’m working with…
Read MoreHow to get WordPress to load jQuery in the header
I had a pretty specific use-case where I needed jQuery to load earlier than usual. After googling “how to force wordpress to load jquery in the header”, I got all kinds of advice about how to replace the WordPress version of jQuery by deregistering the default and registering a different version, etc. I didn’t want…
Read MoreSolving phpcs: Referenced sniff “PSR12.Keywords.ShortFormTypeKeywords” does not exist
I’ve been trying to get the WordPress Coding Standards playing nicely with Visual Studio Code (I had it working on my Mac, but I’ve since moved to Elementary OS and everyone knows that configuring things you haven’t looked at in years is the most fun ever). I’d tried it a couple of months ago and…
Read MoreHow to change the “Quick Page/Post Redirect” plugin’s meta box priority
What I searched for “Quick Page/Post Redirect” metabox priority Why I searched for it I’m adding custom meta boxes to one of my Custom Post Types, but the “Quick Page/Post Redirect” plugin’s meta box has high priority and is jamming itself in where it isn’t wanted (it’s messing up my flow, man!). What I learned…
Read More