Skip to content

Instantly share code, notes, and snippets.

@rahul286
rahul286 / moved.md
Last active August 30, 2020 20:40
woo-commerce fastcgi-cache session-conflict solution (attempt)
@coenjacobs
coenjacobs / wc-remove-dutch-provinces.php
Created January 29, 2013 13:33
Removes the Dutch provinces from WooCommerce country dropdown boxes as they are not required for Dutch shops. Will become superfluous once WooCommerce 2.0 is released. Important: Make sure you select 'Netherlands' as country again in WooCommerce settings.
<?php
/*
Plugin Name: WC Remove Dutch Provinces
Description: Removes the Dutch provinces from the WooCommerce country dropdown boxes, no need to show these. Will become superfluous once WooCommerce 2.0 is released. Important: Make sure you select 'Netherlands' as country again in WooCommerce settings.
Author: Coen Jacobs
Author URI: http://coenjacobs.me/
*/
add_filter( 'woocommerce_states', 'cj_woocommerce_states' );
@dergachev
dergachev / GIF-Screencast-OSX.md
Last active April 28, 2025 00:02
OS X Screencast to animated GIF

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

Screencapture GIF

Instructions

To capture the video (filesize: 19MB), using the free "QuickTime Player" application:

@WebEndevSnippets
WebEndevSnippets / functions.php
Created November 13, 2012 16:48
WooCommerce: Add Prefix to WooCommerce Order Number
add_filter( 'woocommerce_order_number', 'webendev_woocommerce_order_number', 1, 2 );
/**
* Add Prefix to WooCommerce Order Number
*
*/
function webendev_woocommerce_order_number( $oldnumber, $order ) {
return 'WE' . $order->id;
}
@mikejolley
mikejolley / gist:1604009
Created January 13, 2012 00:31
WooCommerce - Add a special field to the checkout, order emails and user/order meta
/**
* Add the field to the checkout
**/
add_action('woocommerce_after_order_notes', 'my_custom_checkout_field');
function my_custom_checkout_field( $checkout ) {
echo '<div id="my_custom_checkout_field"><h3>'.__('My Field').'</h3>';
/**