Skip to content

Instantly share code, notes, and snippets.

View dougaitken's full-sized avatar

Doug Aitken dougaitken

View GitHub Profile

Keybase proof

I hereby claim:

  • I am dougaitken on github.
  • I am dougaitken (https://keybase.io/dougaitken) on keybase.
  • I have a public key whose fingerprint is 3F01 A407 B871 A5BF E737 0328 0B3E E03B FD37 EFAB

To claim this, I am signing this object:

#!/bin/bash
##############################################
#
# This program is provided on an 'as-is' basis.
# No support is offered for any defects found
# in this program.
# No liability is accepted for any damage
# caused through the use of this program.
#
##############################################
@dougaitken
dougaitken / MUFG.txt
Created July 15, 2015 22:24
Daily change for contents of my Ingress MUFG capsule
L8 Reso 30
L8 Burster 30
L8 US 3
ADA 1
VR Shield 2
AXA 2
SB Link 1
FA 2
TU 3
L7 cube 5
@dougaitken
dougaitken / move_stripeprbutton.php
Last active August 11, 2022 10:59
[broken] Moving the WooCommerce Stripe Payment Request buttons below the add to cart button
I'm removing this for now as it broke some point due to code changes. I may revert in the future. I'm glad it helped some folks in the past.
@dougaitken
dougaitken / add_move_payment_request_checkout_page.php
Last active December 20, 2021 21:25
Adds the Payment Request button (Apple Pay) on the checkout page then moves it to after the customer details (WooCommerce Stripe extension)
// Adds the Payment Request button (Apple Pay) on the checkout page then moves it to after the customer details.
// Replace `woocommerce_checkout_after_customer_details` with wherever you want to
add_filter( 'wc_stripe_show_payment_request_on_checkout', '__return_true' );
remove_action( 'woocommerce_checkout_before_customer_details', array( WC_Stripe_Payment_Request::instance(), 'display_payment_request_button_html' ), 1 );
remove_action( 'woocommerce_checkout_before_customer_details', array( WC_Stripe_Payment_Request::instance(), 'display_payment_request_button_separator_html' ), 2 );
add_action( 'woocommerce_checkout_after_customer_details', array( WC_Stripe_Payment_Request::instance(), 'display_payment_request_button_html' ), 1 );
add_action( 'woocommerce_checkout_after_customer_details', array( WC_Stripe_Payment_Request::instance(), 'display_payment_request_button_separator_html' ), 2 );
@dougaitken
dougaitken / woocommerce_bookings_apply_multiple_rules_per_block.php
Created February 17, 2020 16:51
In version 1.1.2 of Accommodation Bookings and 1.15.6 of Bookings, a change was made that affects how Rates are applied for Accommodation Bookings products. Using filter reverts that.
/**
* Add the old Accommodation Bookings logic where more than one Rate can be applied to Accommodation Bookings blocks
* Reverts https://github.com/woocommerce/woocommerce-accommodation-bookings/pull/234
*/
add_filter( 'woocommerce_bookings_apply_multiple_rules_per_block', '__return_true' );
@dougaitken
dougaitken / jetpack_remove_publicize_woocommerce_products.php
Created March 4, 2020 13:22
Disable Jetpack Publicize for WooCommerce Products
// turn off Publicize for Products only
add_action('init', 'doug_woo_publicize_remove');
function doug_woo_publicize_remove() {
remove_post_type_support( 'product', 'publicize' );
}
@dougaitken
dougaitken / pogo_search_snippet.txt
Created September 4, 2020 12:24
Used for Pokemon GO search to find any 'Mon below L3/4, that are not legendary, mythical, shiny, shadow, costume, events, and are lower than 2500 CP
!4*&!3*&!legendary&!mythical&!shiny&!costume&!event&!cp2500-&!shadow