Skip to content

Instantly share code, notes, and snippets.

@cmunns
cmunns / woo_bronto_json.php
Created January 26, 2018 17:31
WooCommerce Bronto Script
add_action('wp_footer', 'add_bronto_json');
function add_bronto_json() {
$brontoItems = [];
if( is_wc_endpoint_url( 'order-received' ) ):
if(isset($_GET['view-order'])) {
$order_id = $_GET['view-order'];
$email = (isset($_POST['email']) ? $_POST['email'] : '';
$sendTo = 'windyd@naturvet.com';
$headers = 'From: '.$email.'' . "\r\n\\";
if( $email != '' ) {
wp_mail($sendTo,'NaturVet.com Newsletter Subscriber', 'Please add '.$email.' to the NaturVet email list.', $headers);
}
@cmunns
cmunns / update-permalinks.php
Created September 8, 2015 17:55
PSU post_type_filter
@cmunns
cmunns / continents.json
Created April 20, 2015 20:11
Continental GeoJson
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.