Skip to content

Instantly share code, notes, and snippets.

AJ Morris ajmorris

Block or report user

Report or block ajmorris

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
ajmorris / functions.php
Created Apr 18, 2018 — forked from mikejolley/functions.php
WooCommerce - Notify admin when a new customer account is created
View functions.php
<?php // Do not include this if already open!
* Code goes in theme functions.php.
add_action( 'woocommerce_created_customer', 'woocommerce_created_customer_admin_notification' );
function woocommerce_created_customer_admin_notification( $customer_id ) {
wp_send_new_user_notifications( $customer_id, 'admin' );
ajmorris / dropdown-stock-status.php
Created Apr 18, 2018 — forked from lawkwok/dropdown-stock-status.php
WooCommerce - Adds stock status to the dropdown on product pages
View dropdown-stock-status.php
add_action( 'woocommerce_after_add_to_cart_form', 'dropdown_waitlist_label' );
function dropdown_waitlist_label() {
echo "
jQuery(document).ready(function($) {
var variation_data = $('form.variations_form').attr('data-product_variations');
var variation_data = JSON.parse(variation_data);
ajmorris / functions.php
Created Apr 18, 2018 — forked from claudiosanches/functions.php
WooCommerce - Change ajax variation threshold
View functions.php
function custom_wc_ajax_variation_threshold( $qty, $product ) {
return 10;
add_filter( 'woocommerce_ajax_variation_threshold', 'custom_wc_ajax_variation_threshold', 10, 2 );
ajmorris / acf-fields.php
Last active Apr 18, 2018 — forked from hereswhatidid/acf-fields.php
Create custom product details tabs within WooCommerce using an ACF (Advanced Custom Fields) Repeater field.
View acf-fields.php
if( function_exists('acf_add_local_field_group') ):
acf_add_local_field_group(array (
'key' => 'acf_product_options',
'title' => 'Product Options',
'fields' => array (
array (
'key' => 'acf_product_options_tabbedcontent_label',
'label' => 'Tabbed Content',
ajmorris / reverse-proxy.php
Last active Aug 8, 2017 — forked from JamesPaden/reverse-proxy.php
Wordpress Reverse Proxy Plugin
View reverse-proxy.php
* @package Reverse Proxy
Plugin Name: Reverse Proxy
Plugin URI:
Description: Reverse proxy setup for Instrumental blog
Version: 1.0
Author: James Paden
View plugin.php
// First, make sure Jetpack doesn't concatenate all its CSS
add_filter( 'jetpack_implode_frontend_css', '__return_false' );
// Then, remove each CSS file, one at a time
// You probably won't need them all, unless you use all the modules, and all the themes! :)
// Some of these are also only loaded on specific admin pages, so it wouldn't affect your readers
function jeherve_remove_all_jp_css() {
wp_deregister_style( 'AtD_style' ); // After the Deadline
View functions.php
add_action( 'wp_enqueue_scripts', 'enqueue_my_styles' );
function enqueue_my_styles() {
global $wp_styles;
// Load the main stylesheet
wp_enqueue_style( 'my-theme', get_stylesheet_directory_uri() . '/style.css' );
View date_field.rb
# Originally from
# Modified for new Merb 0.9.6 helpers
module Merb::Helpers::Form
def date_field(*args)
if bound?(*args)
You can’t perform that action at this time.