Skip to content

Instantly share code, notes, and snippets.

View Pebblo's full-sized avatar
🏠
Working from home

Tony Warwick Pebblo

🏠
Working from home
  • Event Espresso
  • Liverpool, UK
View GitHub Profile
@Pebblo
Pebblo / add-GST-to-invoice.php
Last active August 29, 2015 14:14 — forked from joshfeck/add-GST-to-invoice.php
A simple GST line itemizer for the Event Espresso 3 invoice template function file. Works in conjunction with https://gist.github.com/Pebblo/3477fb76d952684fe239
<?php
//* Please do NOT include the above opening php tag
function my_itemised_surcharge( $attendees ){
$options = get_option( 'events_organization_settings' );
$currency = $options['currency_symbol'];
$this->SetFillColor( 239,239,239 );
//var_dump($attendees);
@Pebblo
Pebblo / functions.md
Last active November 18, 2015 16:43 — forked from joshfeck/template-parts.md
Alters the order of single event details to display the description -> datetimes -> ticket selector. Coded by Josh.
@Pebblo
Pebblo / 0_reuse_code.js
Created April 2, 2014 22:13
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@Pebblo
Pebblo / espresso_create_wp_user.php
Last active December 30, 2015 11:49 — forked from sethshoultes/espresso_create_wp_user.php
A function to create a new WP member using the registration details provided for the event, this function also adds the event they have just registered onto into the my events database so the initial events is displayed within 'My Events'
<?php
//* Please do NOT include the opening php tag, except of course if you're starting with a blank file
add_action('action_hook_espresso_save_attendee_data','espresso_create_wp_user', 10, 1);
function espresso_create_wp_user($attendee_data) {
if( email_exists( $attendee_data['email'] ) == NULL ) {
global $org_options;
// Generate the password and create the user
$password = wp_generate_password( 12, false );