Skip to content

Instantly share code, notes, and snippets.

View lukecav's full-sized avatar
🤔
If we're kind and polite, the world will be right.

Luke Cavanagh lukecav

🤔
If we're kind and polite, the world will be right.
View GitHub Profile
@lukecav
lukecav / functions.php
Last active February 20, 2026 20:48
On the subscriptions list screen in wp-admin change the search order button to be search subscriptions in WooCommerce
add_filter( 'gettext', function( $translated, $text, $domain ) {
// Only target WooCommerce strings in admin
if ( ! is_admin() || $domain !== 'woocommerce' ) {
return $translated;
}
// Check we're on the subscriptions list screen
$screen = get_current_screen();
if ( $screen && $screen->id === 'woocommerce_page_wc-orders--shop_subscription' ) {
@lukecav
lukecav / export-active-subscriptions.sql
Created February 19, 2026 17:54
HPOS-compatible SQL query to export active subscriptions in WooCommerce including start date, next payment date and last order date
SELECT
o.id AS subscription_id,
o.status AS subscription_status,
o.date_created_gmt AS date_created,
a.first_name,
a.last_name,
a.email,
o.total_amount,
o.currency,
last_order.meta_value AS last_order_date_created,
@lukecav
lukecav / functions.php
Created October 23, 2025 19:33
Run the Jetpack full sync every 30 minutes the default is 5 minutes
function jetpackcom_custom_sync_schedule( $schedules ) {
if ( ! isset( $schedules['30min'] ) ) {
$schedules['30min'] = array(
'interval' => 30 * MINUTE_IN_SECONDS,
'display' => __( 'Every 30 minutes' ),
);
}
return $schedules;
}
add_filter( 'cron_schedules', 'jetpackcom_custom_sync_schedule' );
@lukecav
lukecav / Links
Created October 21, 2025 22:26
FluentCart developer docs
@lukecav
lukecav / AGENTS.MD
Created September 15, 2025 21:07
AGENTS.MD — Codex Playbook for Building a WordPress Plugin

AGENTS.md — Codex Playbook for Building a WordPress Plugin

A precise, no-nonsense blueprint for orchestrating autonomous and semi-autonomous coding agents to plan, scaffold, implement, test, and ship a production‑grade WordPress plugin.


0) Purpose & Scope

This document defines the agents, tools, workflows, constraints, and acceptance criteria for using an agentic coding system ("Codex") to create and maintain a WordPress plugin. It is optimized for real, shippable code, not demos.

@lukecav
lukecav / Links
Created July 11, 2025 19:08
Elevate AlmaLinux 9 to 10
@lukecav
lukecav / Command
Created June 26, 2025 21:11
Empty the Jetpack Sync Queue database table using a WP-CLI command
wp db query "TRUNCATE TABLE wp_jetpack_sync_queue;"
@lukecav
lukecav / Links
Created June 26, 2025 17:18
Bulk Editing in ActiveCampaign
@lukecav
lukecav / acf-export-user-field.json
Last active February 20, 2026 20:54
Track Last Login Time and Update User ACF Field
[
{
"key": "group_685c37b820182",
"title": "User Login Info",
"fields": [
{
"key": "field_685c37bd7d63f",
"label": "Last Login Time",
"name": "last_login_time",
"aria-label": "",
@lukecav
lukecav / Links
Created June 23, 2025 20:16
Accept ACH Direct Deposits in Stripe