Skip to content

Instantly share code, notes, and snippets.

View jondcampbell's full-sized avatar

Jon Campbell jondcampbell

View GitHub Profile
@jondcampbell
jondcampbell / example-query.php
Last active August 29, 2015 14:05 — forked from joshfeck/example-query.php
Query event espresso 4 events and order by the events start date. Using this instead of a wp query of espresso_events post type.
<ul class="events">
<?php
$events_args = array(
'title' => NULL,
'limit' => 100,
'css_class' => NULL,
'show_expired' => FALSE,
'month' => NULL,
'category_slug' => NULL,
'order_by' => 'start_date',
@jondcampbell
jondcampbell / gist:7927e2f308b614a8083d
Created August 12, 2014 18:14 — forked from bryceadams/gist:0fe1144b34951d7bb654
Change zip label to postcal code for Canadian woocommerce customers
/*
* Change zip to postal code for canada
*/
add_filter( 'woocommerce_get_country_locale', 'fs_custom_checkout_locale' );
function fs_custom_checkout_locale( $locale ) {
$locale['CA']['postcode']['label'] = __( 'Postal Code', 'woocommerce' );
$locale['CA']['postcode']['placeholder'] = __( 'Postal Code', 'woocommerce' );
return $locale;
@jondcampbell
jondcampbell / gist:6fce0904461dd21d118e
Last active August 29, 2015 14:05 — forked from mikejolley/gist:1604009
Add a text field to woocommerce checkout, save the field data to user meta and order meta. Does not make the user meta show up in profile editor.
/**
* 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="custom_checkout_fields"><h3>'.__('Member Listing Profile').'</h3>';
/**