Skip to content

Instantly share code, notes, and snippets.

@jdeeburke
jdeeburke / csv_export_custom_data_store.php
Created July 30, 2018 12:04
Customer/Order CSV Export Custom Data Store Example
<?php
class Custom_CSV_Export_Data_Store extends WC_Customer_Order_CSV_Export_Data_Store {
/**
* Persists a single item.
*
* @param \WC_Customer_Order_XML_Export_Suite_Export $export the export object this item is a part of
* @param string $content the content to store
*/
@jdeeburke
jdeeburke / functions.php
Last active April 23, 2018 15:30
Custom checkout add-ons positioning
<?php
add_filter( 'wc_checkout_add_ons_position', 'sv_custom_checkout_add_on_position' );
function sv_custom_checkout_add_on_position( $position ) {
return 'woocommerce_checkout_after_terms_and_conditions';
}
@jdeeburke
jdeeburke / pull-db.sh
Last active January 19, 2016 20:09
This is a script which connects to a remote database -- either directly or over SSH, exports a database, stores a backup copy of it in your local folder, then imports that database into the local DB of your choosing.
#!/bin/bash
######## Configuration
BACKUPS_DIR='database_backups'
LOCAL_HOST=''
LOCAL_USER=''
LOCAL_PASS=''
LOCAL_DB=''
@jdeeburke
jdeeburke / pauseYouTube
Created July 9, 2013 21:37
Pause YouTube embed in iFrame
/**
* iFrame Must have '&/?enablejsapi=1'
*
* @param slideIndex
*/
function pauseVideoOnSlide(slide)
{
var iframe = $(slide).find("iframe")[0];
if (iframe) {
### Keybase proof
I hereby claim:
* I am jdeeburke on github.
* I am jdeeburke (https://keybase.io/jdeeburke) on keybase.
* I have a public key whose fingerprint is C2D9 B39F 978B E7C0 FE82 5036 900E 01F9 6145 173B
To claim this, I am signing this object:
@jdeeburke
jdeeburke / gist:9551999
Created March 14, 2014 17:01
EE Completions
{
"scope": "text.html.ee",
"completions":
[
{ "trigger": "{exp:", "contents": "exp:channel:" },
{ "trigger": "{exp:channel:entries", "contents": "exp:channel:entries"},
{ "trigger": "{exp:channel:info", "contents": "channel:info" }
]
}