Skip to content

Instantly share code, notes, and snippets.

View sisaacrussell's full-sized avatar

Isaac Russell sisaacrussell

View GitHub Profile
@sisaacrussell
sisaacrussell / functions.php
Created September 12, 2019 13:47
Allow payment from WC generated invoice without login
/* Allow payment from WC generated invoice without login
* @see https://wordpress.org/support/topic/order-pay-without-login/
*/
function allow_payment_without_login( $allcaps, $caps, $args ) {
// Check we are looking at the WooCommerce Pay For Order Page
if ( !isset( $caps[0] ) || $caps[0] != 'pay_for_order' )
return $allcaps;
// Check that a Key is provided
if ( !isset( $_GET['key'] ) )
@sisaacrussell
sisaacrussell / tickets-plus-disable-tax.php
Last active September 19, 2019 18:53 — forked from jesseeproductions/tickets-plus-disable-tax.php
Event Tickets Plus - Disable Taxes for Ticket Products
<?php
/**
* Event Tickets Plus - Disable Taxes for Ticket Products
*/
function tribe_disable_taxes_ticket_product( $post_id, $ticket ) {
update_post_meta( $ticket->ID, '_tax_status', 'none' );
update_post_meta( $ticket->ID, '_tax_class', 'zero-rate' );
}
add_action( 'event_tickets_after_save_ticket', 'tribe_disable_taxes_ticket_product', 10, 2 );
@sisaacrussell
sisaacrussell / inovelli-lzw31-sn.yaml
Created October 30, 2021 06:31
Inovelli LZW31-SN Red-Series Dimmer This is a blueprint for triggering actions based on presses of the On/Off/Config buttons of the Inovelli LZW31 Red-Series Dimmer using the new ZWave-JS Integration. @via https://community.home-assistant.io/t/zwave-js-inovelli-lzw31-sn-red-series-dimmer/276577
blueprint:
name: Inovelli Red Series LZW31-SN Dimmer (ZWave-JS)
description: Create automations for the Inovelli Red Series LZW31-SN Dimmer using the ZWave-JS integration.
domain: automation
input:
inovelli_switch:
name: Inovelli Dimmer
description: "List of available inovelli LZW31-SN dimmers."
selector:
device:
@sisaacrussell
sisaacrussell / increase-variation-threshold.php
Created March 29, 2022 17:46 — forked from jessepearson/increase-variation-threshold.php
Increase the number of variations loaded in the WooCommerce front end for dynamic filtering of available variations in the drop down lists.
<?php //only copy this line if needed
/**
* Function filters the threshold for the amount of variables to load in the front end.
*
* @see https://woocommerce.wordpress.com/2015/07/13/improving-the-variations-interface-in-2-4/
*
* @return int 100 The new threshold.
*/
add_filter( 'woocommerce_ajax_variation_threshold', function() { return 100; } );
@sisaacrussell
sisaacrussell / functions.php
Created July 14, 2022 01:48
Change heading for "Expires:" column in the WooCommerce Memberships My Account members area.
<?php
// Only copy opening php tag if needed
/**
* Change heading for "Expires:" column in the WooCommerce Memberships My Account members area.
*
* @param array $columns Array of columns to display in membership area.
* @return $columns
*/
function sprucely_rename_membership_end_date_column( $columns ) {
@sisaacrussell
sisaacrussell / bento_validate_email.ps1
Created August 14, 2024 07:07
Validate Excel file of email data against Bento Experimental API
<#
.SYNOPSIS
This script processes email subscriber data in an Excel file, sends each entry to the Bento API for validation, and writes the boolean response to Column D.
.DESCRIPTION
- The script requires the System.Web assembly to be loaded for URL encoding.
- The script handles rate limiting (100 requests per minute) and includes progress tracking.
- A progress log is displayed in the terminal, showing current progress, out of total rows, and estimated time remaining.
.INSTRUCTIONS