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 / add-to-template.php
Last active August 29, 2015 14:14 — forked from joshfeck/add-to-template.php
This gist works in conjunction with https://gist.github.com/Pebblo/48b2ce8b15b898a2611f. You can add the following to /gateways/invoice/template.php to display the price without surcharge and surcharge amount as line items on the invoice.
// suggested code placement is right after the line that says:
// $pdf->ImprovedTable($header, $attendees, $w, $alling);
$pdf->Ln(1);
$pdf->my_itemised_surcharge($attendees);
@Pebblo
Pebblo / ee_custom_translate.php
Created February 4, 2015 17:15
Remove ' or ' from the event list page between the 'Register Now' and 'Add to Cart' link. Add this function to your themes functions.php.
<?php
//Please do not include the opening PHP tag.
function mycustom_filter_gettext( $translated, $original, $domain ) {
// This is an array of original strings
// and what they should be replaced with
$strings = array(
' or ' => '',
// Add some more strings here
@Pebblo
Pebblo / attendee_list.php
Last active August 29, 2015 14:15
EE3 [LISTATTENDEES] shortcode that includes a call to include details of the seat the attende has booked. $seatingchart_tag, $seatingchart_seat, $seatingchart_row, $seatingchart_section are all set to empty strings and then the seat number is used to pull in the information from the seating table, this is then assigned to the variables mentioned…
<?php
//List Attendees Template
//Show a list of attendees using a shortcode
//[LISTATTENDEES]
//[LISTATTENDEES limit="30"]
//[LISTATTENDEES show_expired="false"]
//[LISTATTENDEES show_deleted="false"]
//[LISTATTENDEES show_secondary="false"]
//[LISTATTENDEES show_gravatar="true"]
//[LISTATTENDEES paid_only="true"]
@Pebblo
Pebblo / functions.php
Last active May 26, 2020 21:07
Translate 'Attendee %d' & 'Attendee Information' to 'Participant %d' and 'Participant Information'.
<?php
//Please do not include the opening PHP tag.
function mycustom_filter_gettext( $translated, $original, $context, $domain ) {
// This is an array of original strings
// and what they should be replaced with
$strings = array(
'Attendee Information' => 'Participant Information',
@Pebblo
Pebblo / default reg approved
Last active August 29, 2015 14:15
Default message content for Registration Approved -> Primary Registrant context.
<-- MAIN CONTENT -->
<table class="head-wrap" bgcolor="#999999">
<tbody>
<tr>
<td></td>
<td class="header container">
<div class="content">
<table bgcolor="#999999">
<tbody>
<tr>
@Pebblo
Pebblo / function.php
Created February 20, 2015 19:53
Translation function to modify the thank you page text. Place this function within your themes functions.php file or a site specific plugin.
<?php
//* Please do NOT include the opening php tag, except of course if you're starting with a blank file
function mycustom_filter_gettext( $translated, $original, $domain ) {
// This is an array of original strings
// and what they should be replaced with
$strings = array(
'%1$sCongratulations%2$sYour registration has been successfully processed.%3$sCheck your email for your registration confirmation or click the button below to view / download / print a full description of your purchases and registration information.' => 'Thank you for submitting payment. Your order has been successfully completed. It is important for you to complete the TEAM REGISTRATION form if you are playing in the croquet tournament. Click the button below to visit the registration form.',
// Add some more strings here
@Pebblo
Pebblo / ee-permissions-fix.php
Created March 3, 2015 12:00
This plugin removes the individual questions/question groups per event admin so that all questions can be used by all event admins.
<?php
/*
Plugin Name: Event Question Fix
Plugin URI:
Description: This Plugin corrects issues for event espresso where a new event editor cannot see all of the questions for events.
Version:
Author:
Author URI:
License:
License URI:
@Pebblo
Pebblo / functions.php
Last active August 29, 2015 14:16
Place this function within your themes functions.php file or within a site specific plugin.
<?php
//* Please do NOT include the opening php tag, except of course if you're starting with a blank file
function mycustom_filter_gettext( $translated, $original, $domain ) {
// This is an array of original strings
// and what they should be replaced with
$strings = array(
'Please choose a payment option' => 'Please select the Paypal icon below to be taken to the Paypay site for payment',
// Add some more strings here
@Pebblo
Pebblo / event_category_from_id.php
Last active September 23, 2015 09:47
Output an events first cateory name and slug using the EE_Term object.
<?php
// The Event ID.
$event_id = 42;
//Pull the event object using the ID.
$event = EEM_Event::instance()->get_one_by_ID($event_id);
//Check we have an instance of an EE_Event
if ( $event instanceof EE_Event ) {