



A longer run today with my son on the bike. And a long stop at Dries’ for a chat and a cup of tea ❤️.




A longer run today with my son on the bike. And a long stop at Dries’ for a chat and a cup of tea ❤️.
Watch these artists prepare for their show:
I’m really into Lucie Antunes percussive electronic/classic mashups recently. Have been going through a lot of their music in the last days.
I started a new Git Repository for a WordPress plugin I’m creating to contain the features that I want on this website related to Photoblogging.
Currently only the first two bullets have been implemented. I’ve created a custom renderer for the Post Content that extracts the first image block (in the future I’ll add gallery and video blocks).
Then I added some styling to make the images always fit within the designated grid square, without stretching it to the image’s original size.

meet Ruby
For me, one of the discoveries of 2024, has been ddev, a tool to manage PHP (and other) environments, based on Docker images.

In the last months I have been very happy using this project. It allows me to work locally on my source files and assets while at the same time have a specific environment with the exact server configuration that I need.
Let me sum up some cases where it really came in a handy:
git clone https://github.com/craftcms/europa-museum.git
cd europa-museum
ddev start
ddev craft db/restore seed.sqlddev config and ddev start.ddev sequelace and I’m in the database, editing the data.ddev mailpit and see the mails that have been sent out, in a Gmail like UI, or download them as a PNG screenshotddev ssh and we’re up and running.Unknown collation utf8mb4_0900_ai_ci? just switch from mariadb to mysql, run ddev restart and import again.xdebug.ini in the correct config directoryI guess it’s clear that I’m excited about this addition to my toolchain.
I’ve always been running Apache, MySQL, mkcert, MailHog through homebrew. And while that served my needs, I had to reconfigure quite a lot every time I ran brew upgrade.
PS: last week I sent a toot at @atpfm suggesting ddev as a solution for Marco’s work on Overcast. I was happy to hear Casey read/butcher my name on the podcast 😄.
I am working on a remote location today, on a shared venue network.
After rebooting my Mac I could no longer connect to any website domain, which led me to believe that DNs was not resolving. And indeed, pinging www.google.com gave no results. Even when tethered to my iPhone, I could not connect to any website. Connecting to VPN by IP did work though, and pinging 8.8.8.8 worked fine as well.
Luckily, I could search for clues on my phone, and ran into this command that I have not used before:
scutil --dns which gives you a nice list of DNS resolvers as they are used by the system, and, on top of that list this entry:
resolver #1
search domain[0] : tailf67a92.ts.net
nameserver[0] : 100.100.100.100
if_index : 24 (utun4)
flags : Supplemental, Request A records, Request AAAA records
reach : 0x00000003 (Reachable,Transient Connection)
order : 102000I restarted Tailscale, and we are online again 🎉.

The creek flooded the trail after tonights rain

Exploring some new city neighbourhoods
If you have setup a WooCommerce shop recently, or have enabled their HPOS1 you will want to enable compatibility mode as soon as you use any extension.
I’m running into issues with WooCommerce Memberships not able to create memberships for users, because it cannot find the users related to an order:
/**
* Returns users IDs from orders that contain products that could grant access to a given plan.
*
* TODO When WooCommerce starts using alternate data stores for products (perhaps from WC 3.5+) this method may require an update as it performs a direct SQL query assuming a standard WPDB data organization {FN 2018-07-23}
*
* @since 1.10.6
*
* @param int[] $access_product_ids array of product IDs that grant access to a plan upon purchase
* @return int[] array of user IDs
*/
private function get_users_for_retroactive_access( array $access_product_ids ) {
global $wpdb;
if ( ! empty( $access_product_ids ) ) {
// get orders that contain an access granting product (or variation) to the given plan
$product_ids = Strings_Helper::esc_sql_in_ids( $access_product_ids );
$orders_table = Framework\SV_WC_Order_Compatibility::get_orders_table();
$order_id_col = Framework\SV_WC_Plugin_Compatibility::is_hpos_enabled() ? 'id' : 'ID';
$order_ids = $wpdb->get_col( "
SELECT DISTINCT orders.{$order_id_col}
FROM {$wpdb->prefix}woocommerce_order_itemmeta AS order_item_meta,
{$wpdb->prefix}woocommerce_order_items AS order_items,
$orders_table AS orders
WHERE order_items.order_item_id = order_item_meta.order_item_id
AND order_items.order_id = orders.{$order_id_col}
AND ( ( order_item_meta.meta_key LIKE '_product_id' AND order_item_meta.meta_value IN ({$product_ids}) )
OR ( order_item_meta.meta_key LIKE '_variation_id' AND order_item_meta.meta_value IN ({$product_ids}) ) )
" );
if ( ! empty( $order_ids ) ) {
// get user IDs for the found orders
$order_ids = Strings_Helper::esc_sql_in_ids( $order_ids );
$user_ids = $wpdb->get_col( "
SELECT posts_meta.meta_value
FROM {$wpdb->prefix}postmeta AS posts_meta
WHERE posts_meta.post_id IN ({$order_ids})
AND posts_meta.meta_key = '_customer_user'
" );
}
}
return ! empty( $user_ids ) ? array_unique( array_map( 'absint', array_values( $user_ids ) ) ) : [];
}With HPOS, the customer id is saved in the wp_wc_orders table instead.
The last weeks, I’ve been overwhelmed by work, so no time to work on the blog or write posts. Also a bit depressed by the state of the world. And some family troubles that need time and attention.
Here’s to a positive outcome for all of this.