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
@razajahangir
razajahangir / export-active-and-canceled-subscriptions.sql
Last active January 27, 2026 15:59
HPOS-compatible SQL query to export active and canceled subscriptions in WooCommerce.
-- Export Active and Canceled Subscriptions (HPOS Compatible)
-- Adjust the table prefix 'wp_' if your database uses a different one, though 'wp_' was detected in wp-config.php.
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,
@razajahangir
razajahangir / export-wc-hpos-orders-sql.sql
Last active January 27, 2026 08:58
Advanced SQL query to export WooCommerce orders (Date, Email, Products, Coupons) from HPOS-enabled tables (wp_wc_orders) by joining with legacy item tables. Optimized for reporting.
SELECT
o.id AS Order_ID,
o.status AS Order_Status, -- Added Order Status here
o.date_created_gmt AS Order_Date,
a.email AS Billing_Email,
(
SELECT GROUP_CONCAT(order_item_name SEPARATOR ' | ')
FROM wp_woocommerce_order_items oi
WHERE oi.order_id = o.id
AND oi.order_item_type = 'line_item'
@clip1492
clip1492 / favorites-hardening.php
Last active January 23, 2026 14:06
Unofficial temporary Security patch for LFI vulnerability in Favorites 2.3.6
<?php
/**
* Plugin Name: Favorites Hardening (MU)
* Description: Security hardening for the Favorites plugin — clamps the ?tab parameter in admin settings and validates public AJAX calls.
* Author: clip1492
* Version: 1.1
*/
if ( ! defined('ABSPATH') ) { exit; }
@SRHDesign
SRHDesign / README.md
Last active November 5, 2025 22:12
Elementor + ACF Product Accordions - Complete system with auto-cleanup"

Elementor + ACF Product Accordions System

A complete solution for managing dynamic product accordions in WooCommerce using Elementor and Advanced Custom Fields (ACF).

📦 What's Included

  1. JavaScript Optimizer - Automatically cleans empty accordions and fixes video loading
  2. ACF Field Group - Pre-configured fields for 5 product accordions
  3. Complete Integration - Works seamlessly with Elementor's nested accordion widget
@SRHDesign
SRHDesign / README.md
Last active November 12, 2025 10:04
WooCommerce AutoComplete with Classic Checkout and Block Checkout

WooCommerce AutoComplete with Classic Checkout and Block Checkout in WooCommerce

A lightweight, accessible WordPress plugin that adds Google Places address autocomplete to WooCommerce checkout pages. Built with WCAG AAA accessibility standards and full support for both classic and block-based checkouts.

🌟 Features

  • New Google Places API - Uses the latest REST-based Places API (v1)
  • Universal Checkout Support - Works with both classic shortcode and block-based checkouts
  • Session Token Optimization - Efficient billing with proper session token management
  • Multi-Region Support - Configurable country restrictions
@jack-arturo
jack-arturo / claude-automation-cron-setup.md
Created August 22, 2025 04:23
Complete macOS Setup Guide for Claude Automation Hub

Complete macOS Setup Guide for Claude Automation Hub

Step 1: Install Claude Desktop & Claude Code

# Install Claude Desktop (if not already installed)
# Download from: https://claude.ai/download

# Install Claude Code via Homebrew (when available)
# Note: As of now, check if Claude Code is released
@vlaaad
vlaaad / _Defold_MCP.md
Last active January 31, 2026 05:05
Defold MCP server

Steps to try it out:

  1. Add mcp.editor_script to a Defold project
  2. Project -> Reload Editor Scripts
  3. It will print something like MCP running on http://localhost:50489/mcp — your port will be different
  4. Ensure that npx mcp-remote http://localhost:50489/mcp --transport http-only successfully runs in your terminal.
  5. Edit Claude desktop config to refer to the server (see claude_desktop_config.json for reference)
  6. Restart Claude and enjoy!
<?php
/**
* Vary LCP Image Optimizations WordPress Plugin.
*
* @package VaryLcpImageOptimizations
* @author Weston Ruter, Google
* @license GPL-2.0-or-later
* @copyright 2023 Google Inc.
*
* @wordpress-plugin
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="icon" href="https://glitch.com/favicon.ico" />
<title>image-with-fetchpriority-and-with-preload.html</title>
<link
<?php
/**
* Contact Form 7 Conditional Enqueues WordPress Plugin.
*
* @package CF7_Conditional_Enqueues
* @author Weston Ruter, Google
* @license GPL-2.0-or-later
* @copyright 2023 Google Inc.
*
* @wordpress-plugin