Skip to content

Instantly share code, notes, and snippets.

View Firestorm-Graphics's full-sized avatar

Firestorm Graphics Firestorm-Graphics

View GitHub Profile
@mikejolley
mikejolley / gist:1965933
Created March 3, 2012 12:50
WooCommerce payment gateway plugin base
<?php
/*
Plugin Name: WooCommerce <enter name> Gateway
Plugin URI: http://woothemes.com/woocommerce
Description: Extends WooCommerce with an <enter name> gateway.
Version: 1.0
Author: WooThemes
Author URI: http://woothemes.com/
Copyright: © 2009-2011 WooThemes.
@mikejolley
mikejolley / functions.php
Last active April 23, 2018 13:31
WooCommerce - Custom tracking code
add_action( 'woocommerce_thankyou', 'my_custom_tracking' );
function my_custom_tracking( $order_id ) {
// Lets grab the order
$order = wc_get_order( $order_id );
/**
* Put your tracking code here
* You can get the order total etc e.g. $order->get_total();
@mikejolley
mikejolley / gist:1425282
Created December 2, 2011 23:12
This snippet lets you edit the icon for the PayPal gateway in WooCommerce.
add_filter('woocommerce_paypal_icon', 'custom_woocommerce_paypal_icon')
function custom_woocommerce_paypal_icon( $url ) {
$url = 'http://yoursite,com/youriconurl.png';
return $url;
}