Skip to content

Instantly share code, notes, and snippets.

@jakehasler
jakehasler / webchat_events.md
Created May 20, 2019 18:04
Capturing Podium Webchat Events

How to Capture Podium Webchat Events on Your Website

Learn to send Webchat events and leads to your CRM or system of record

What is this?

If you are using Podium Webchat on your business website, you have the ability to capture events from the widget and send them to the place of your choosing. This article assumes that:

  • You are currently using Podium Webchat
  • You have the technical knowledge to modify your website and write the necessary code you need to send the events
<?php
add_action( 'template_redirect', 'wp_multisite_sidebar_save' );
function wp_multisite_sidebar_save() {
if ( is_main_site() && isset( $_GET['get_sidebar'] ) ) {
$sidebar = $_GET['get_sidebar'];
ob_start();
dynamic_sidebar( $sidebar );
$markup = ob_get_clean();
<?php
/**
* Adds new shortcode "myprefix_say_hello" and registers it to
* the Visual Composer plugin
*
*/
if ( ! class_exists( 'MyPrefix_Say_Hello_Shortcode' ) ) {
class MyPrefix_Say_Hello_Shortcode {
Our favorite cruise was on the <i>Explorer of the Seas</i>, --> italicize the name of a ship
which we read about in <cite>Cruising</cite> magazine, --> reference the name of a publication
and we <em>loved</em> it. --> emphasize a feeling
(<b>Note:</b> This was before everyone got all sick --> start a note with bolded text
and was throwing up <strong>everywhere</strong>.) --> make a strong statement
@julianxhokaxhiu
julianxhokaxhiu / pagespeed_optimize_images.sh
Last active June 15, 2024 17:09
Recursively optimize all PNG and JPG files wherever they are from the script position and inner ( based on OPTING, PNGCRUSH, ADVANCECOMP and JPEGOPTIM )
#!/bin/bash
# Improved as per feedback from @pascal - https://gist.github.com/julianxhokaxhiu/c0a8e813eabf9d6d9873#gistcomment-3086462
find . -type f -iname "*.png" -exec optipng -nb -nc {} \;
find . -type f -iname "*.png" -exec advpng -z4 {} \;
find . -type f -iname "*.png" -exec pngcrush -rem gAMA -rem alla -rem cHRM -rem iCCP -rem sRGB -rem time -ow {} \;
find . -type f \( -iname "*.jpg" -o -iname "*.jpeg" \) -exec jpegoptim -f --strip-all {} \;
@theeventscalendar
theeventscalendar / add-event-title.php
Last active July 3, 2023 22:47 — forked from geoffgraham/gist:145f929f4547bb2c690e
Add event title to cart next to ticket name
<?php
/**
* Example for adding event data to WooCommerce checkout for Events Calendar tickets.
* @link http://theeventscalendar.com/support/forums/topic/event-title-and-date-in-cart/
*/
add_filter( 'woocommerce_cart_item_name', 'woocommerce_cart_item_name_event_title', 10, 3 );
function woocommerce_cart_item_name_event_title( $title, $values, $cart_item_key ) {
$ticket_meta = get_post_meta( $values['product_id'] );
$event_id = absint( $ticket_meta['_tribe_wooticket_for_event'][0] );
@geoffgraham
geoffgraham / gist:145f929f4547bb2c690e
Last active September 18, 2015 21:16
WooCommerce Tickets 3.9.3 // Add Event Title to cart next to Ticket Name
<?php
/**
* Example for adding event data to WooCommerce checkout for Events Calendar tickets.
* @link http://theeventscalendar.com/support/forums/topic/event-title-and-date-in-cart/
*/
add_filter( 'woocommerce_cart_item_name', 'woocommerce_cart_item_name_event_title', 10, 3 );
function woocommerce_cart_item_name_event_title( $title, $values, $cart_item_key ) {
$ticket_meta = get_post_meta( $values['product_id'] );
$event_id = absint( $ticket_meta['_tribe_wooticket_for_event'][0] );
@bmoredrew
bmoredrew / gist:dcc7d04b23e785f6c0bb
Created April 27, 2015 15:56
Front-end Attendee List WooCommerce WooTickets Events Calendar Plugin
<?php
global $current_user;
get_currentuserinfo();
if (is_user_logged_in() && $current_user->ID == $post->post_author) {
// Build a list of attendees
$attendeeList = TribeEventsTickets::get_event_attendees($event_id);
$customerList = array();
@thetrickster
thetrickster / cf7-custom-validations.md
Last active August 29, 2015 14:18
Contact Form 7 4.1 Custom Validations Fix/Error
@bmoredrew
bmoredrew / gist:c32ef178f138c8335ca2
Created March 3, 2015 18:40
Add service fee to woo cart per item
add_action( 'woocommerce_cart_calculate_fees', 'df_add_handling_fee' );
function df_add_handling_fee( $cart_object ) {
global $woocommerce;
// $specialfeecat = 3711; // category id for the special fee
$spfee = 0.00; // initialize special fee
$spfeeperprod = 2.50; //special fee per product
//Getting Cart Contents.
$cart = $woocommerce->cart->get_cart();