This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//https://www.thathandsomebeardedguy.com/i'd-love-to-❤️-you-more | |
var credentials = { | |
clientId: 'someclientid', | |
clientSecret: 'someclientsecret', | |
redirectUri: 'http://localhost:8888/callback' | |
}; | |
//npm install spotify-web-api-node --save | |
var SpotifyWebApi = require('spotify-web-api-node'); | |
var spotifyApi = new SpotifyWebApi(credentials); | |
//npm install fs |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//not sure what to do with this code snippet? See https://www.thathandsomebeardedguy.com/what-do-i-do-with-these-code-snippets/ | |
add_filter( 'woocommerce_xero_create_unique_tax_label', '__return_false' ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//not sure what to do with this code snippet? See https://www.thathandsomebeardedguy.com/what-do-i-do-with-these-code-snippets/ | |
add_filter( 'wcs_update_all_subscriptions_addresses_checked', '__return_true' ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//not sure what to do with this code snippet? See https://www.thathandsomebeardedguy.com/what-do-i-do-with-these-code-snippets/ | |
if ( is_admin() ) { | |
add_filter( 'woocommerce_product_variation_get_manage_stock', '__return_true' ); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//not sure what to do with this code snippet? See https://www.thathandsomebeardedguy.com/what-do-i-do-with-these-code-snippets/ | |
add_filter( 'wc_stripe_payment_request_total_label_suffix', '__return_empty_string' ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//not sure what to do with this code snippet? See https://www.thathandsomebeardedguy.com/what-do-i-do-with-these-code-snippets/ | |
add_filter( 'woocommerce_add_to_cart_sold_individually_found_in_cart', 'handsome_bearded_guy_maybe_redirect_to_cart' ); | |
function handsome_bearded_guy_maybe_redirect_to_cart( $found_in_cart ) { | |
if ( $found_in_cart ) { | |
wp_safe_redirect( wc_get_page_permalink( 'cart' ) ); | |
exit; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//not sure what to do with this code snippet? See https://www.thathandsomebeardedguy.com/what-do-i-do-with-these-code-snippets/ | |
add_filter( 'wc_stripe_checkout_locale', 'handsome_bearded_guy_stripe_checkout_locale' ); | |
function handsome_bearded_guy_stripe_checkout_locale() { | |
return 'auto'; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//not sure what to do with this code snippet? See https://www.thathandsomebeardedguy.com/what-do-i-do-with-these-code-snippets/ | |
add_filter( 'woocommerce_loop_add_to_cart_link', 'handsome_bearded_guy_maybe_remove_add_to_cart_button' ); | |
function handsome_bearded_guy_maybe_remove_add_to_cart_button( $html ) { | |
global $product; | |
if ( 'simple' === $product->get_type() && ! $product->get_stock_quantity() ) { | |
return null; | |
} | |
return $html; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//not sure what to do with this code snippet? See https://www.thathandsomebeardedguy.com/what-do-i-do-with-these-code-snippets/ | |
add_filter( 'woocommerce_states', 'add_uae_emirates' ); | |
function add_uae_emirates( $states ) { | |
$states['AE'] = array( | |
'AZ' => __( 'Abu Dhabi', 'woocommerce' ), | |
'AJ' => __( 'Ajman', 'woocommerce' ), | |
'FU' => __( 'Fujairah', 'woocommerce' ), | |
'SH' => __( 'Sharjah', 'woocommerce' ), | |
'DU' => __( 'Dubai', 'woocommerce' ), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name A8C - Once key field auto-filler | |
// @namespace http://automattic.com/ | |
// @version 0.1 | |
// @description Pre-fill Once fields | |
// @author Remi Corson | |
// @match https://mc.a8c.com/once/* | |
// @require http://code.jquery.com/jquery-latest.js | |
// @grant none | |
// ==/UserScript== |