Skip to content

Instantly share code, notes, and snippets.

View ee4-restore-paypal-standard.php
Plugin Name: Event Espresso - Restore PayPal Standard
Description: This plugin allows you to use PayPal Standard on your website. By allowing your customers to use PayPal Standard, you may face inconsistencies with payments.
add_filter( 'FHEE__EE_PMT_Paypal_Express__register_payment_methods__hide_paypal_standard', '__return_false' );
sethshoultes / ee_display_download_tickets.php
Created February 12, 2016 17:53 — forked from Pebblo/ee_display_download_tickets.php
Add a 'Download your tickets' button to the EE4 thank you page. The hook in use adds the button above the overview, just under the confirmation order section. You will likely need to apply your own styles, possibly a container div and apply styles to that depending on how you want this to be displayed.
View ee_display_download_tickets.php
//* Please do NOT include the opening php tag, except of course if you're starting with a blank file
function ee_display_download_tickets( $transaction ) {
if ( $transaction instanceof EE_Transaction ) {
$primary_reg = $transaction->primary_registration();
if ( $primary_reg->is_approved() ) {
sethshoultes / ee_password_post_filter.php
Created May 15, 2015 16:33
Exclude password protected events and posts from the WordPress loop. Adapted from Stackoverflow:
View ee_password_post_filter.php
//* Please do NOT include the opening php tag, except of course if you're starting with a blank file
// Create a new filtering function that will add our where clause to the query
function ee_password_post_filter( $where = '' ) {
// Make sure this only applies to loops / feeds on the frontend
if (!is_single() && !is_admin()) {
// exclude password protected
$where .= " AND post_password = ''";
sethshoultes / HelpScout Docs Customization
Last active August 29, 2015 14:14 — forked from seedprod/gist:7de2027ad32e1a5ee8d9
Adds new buttons to HelpScout Docs
View HelpScout Docs Customization
<!-- Replace default Contact Us url in HelpScout Docs with custom url and add a My Account link to the top menu -->
<script src="//"></script>
$(function() {
$("#contact a,#sbContact,#sbContactMobile, #contactMobile a").attr("href", "").text('Open a Ticket');
$( "#mainNav .nav" ).append( "<li><a href=''>My Account</a></li>" );
<!-- custom styles -->
sethshoultes /
Last active November 18, 2015 17:52 — forked from Pebblo/
This moves the ticket selector from before the event content to after the event content. Requires Event Espresso 4.8.24.p or greater.
View widget-pending-view
case 'PENDING':
if (current_user_can('administrator') || function_exists('espresso_member_data') && espresso_can_view_event($event_id) == true) {
<li class="pending_event"><a href="<?php echo $registration_url; ?>"><?php echo stripslashes_deep($event->event_name) ?> - <span class="widget-event-date"><?php echo event_date_display($event->start_date) ?></span></a>
sethshoultes / 0_reuse_code.js
Created April 2, 2014 22:59
Here are some things you can do with Gists in GistBox.
View 0_reuse_code.js
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
View filter_gettext.php
function mycustom_filter_gettext( $translated, $original, $domain ) {
// This is an array of original strings
// and what they should be replaced with
$strings = array(
'Register' => 'Sign up',
'Confirm and go to payment page' => 'Complete registration',
// Add some more strings here
sethshoultes / espresso_create_wp_user.php
Last active February 16, 2016 16:58
This action creates a WordPress user when someone registers for your an event. It uses the email address of the registrant to create the user name and the password is randomly generated. Add this function and action to your theme/functions.php file. More info in the comments below.
View espresso_create_wp_user.php
add_action('action_hook_espresso_save_attendee_data','espresso_create_wp_user', 10, 1);
function espresso_create_wp_user($attendee_data) {
if( username_exists( $attendee_data['email'] ) == NULL ) {
global $org_options;
// Generate the password and create the user
$password = wp_generate_password( 12, false );
$user_id = wp_create_user( $attendee_data['email'], $password, $attendee_data['email'] );
sethshoultes / event_list.php
Created February 4, 2013 07:10
When we added the feature to use multiple categories in the EVENT_LIST short code, we lost/broke existing categories because they are stored in a different table. With the added support for multiple categories, we started storing a comma separated list of category ids in the events_detail table. So I am adding support for the legacy and new cate…
View event_list.php
//This is a template file for displaying a list of events on a page. These functions are used with the [ESPRESSO_EVENTS] shortcode.
//This is an group of functions for querying all of the events in your databse.
//This file should be stored in your "/wp-content/uploads/espresso/templates/" directory.
//Note: All of these functions can be overridden using the "Custom Files" addon. The custom files addon also contains sample code to display ongoing events
if (!function_exists('display_all_events')) {
function display_all_events() {