Skip to content

Instantly share code, notes, and snippets.

View IanMisnerThough's full-sized avatar

Ian Misner IanMisnerThough

View GitHub Profile
<?php // remove this line if not needed
add_action( 'init', 'sv_memberships_delete_user_memberships' );
function sv_memberships_delete_user_memberships() {
global $wpdb;
if ( $user = get_user_by( 'email', 'EMAIL-ADDRESS' ) ) {
$wpdb->delete(
/**
* Make the Team Name field on the product page Required
* Requires Teams 1.0.2
*
* @param array $fields the product page fields
* @param \WC_Product $product current product, unused
* @return array updated fields
*/
add_filter( 'wc_memberships_for_teams_product_team_user_input_fields', function( $fields, $product ) {
@IanMisnerThough
IanMisnerThough / obsidian-meeting-agenda.md
Created January 3, 2021 18:41
A meeting agenda template for Obsidian.md

Meeting Title

  • Date:
  • Start Time:
  • End Time:
  • Attendees:

Meeting Objective

This space should also be used for introductions, if necessary
@IanMisnerThough
IanMisnerThough / improved_capital_p_dangit.php
Last active November 12, 2025 20:52
Improved capital_p_dangit
remove_filter( 'the_content', 'capital_P_dangit', 11 );
remove_filter( 'the_title', 'capital_P_dangit', 11 );
remove_filter( 'comment_text', 'capital_P_dangit', 31 );
add_filter( 'the_content', 'improved_capital_p_dangit', 11 );
add_filter( 'the_title', 'improved_capital_p_dangit', 11 );
add_filter( 'comment_text', 'improved_capital_p_dangit', 31 );
function improved_capital_p_dangit( $text ) {
return preg_replace_callback( '/\bWordPress\b/i', function( $matches ) {
@IanMisnerThough
IanMisnerThough / cfw-product-specific-thank-you-page-messaging.php
Created November 13, 2025 04:01
CheckoutWC - allows you to change the order summary text for specific products (used for gift cards or digital products)
/**
* Name: Custom CheckoutWC Thank You Page Messages for Specific/Special Products
* Description: Overrides CheckoutWC order updates and local pickup messages when specific products are in the order.
* Author: Kestrel
* Date: 2025-11-12
*/
if ( ! defined( 'ABSPATH' ) ) {
exit;
}