Skip to content

Instantly share code, notes, and snippets.

View jtcote's full-sized avatar

Jayson T. Cote jtcote

View GitHub Profile
@jtcote
jtcote / gum_woo_api_example.php
Created September 8, 2016 18:08
Woocommerce API Example
require_once 'lib/woocommerce-api.php';
$consumer_key = 'ck_b19dd8998398a762d0a5062e9fd1cef1c38bdcf1';
$consumer_secret = 'cs_12bb4182989d216d02a773586d680d481caef086';
$store_url = 'http://shop.lifespa.com/';
$options = array(
'debug' => true,
'return_as_array' => true,
'validate_url' => false,
'timeout' => 30,
Array
(
[orders] => Array
(
[0] => Array
(
[id] => 3520
[order_number] => 3520
[created_at] => 2016-09-01T20:37:12Z
[updated_at] => 2016-09-01T20:37:12Z
@jtcote
jtcote / woocommerce-my-account.php
Last active August 17, 2017 13:30 — forked from SirDarcanos/functions.php
Adds VAT and SSN fields in WooCommerce workflow
// Add VAT and SSN fields in billing address display
add_filter( 'woocommerce_order_formatted_billing_address', 'custom_add_vat_ssn_formatted_billing_address', 10, 2 );
function custom_add_vat_ssn_formatted_billing_address( $fields, $order ) {
$fields['vat'] = $order->billing_vat;
$fields['ssn'] = $order->billing_ssn;
return $fields;
}
add_filter( 'woocommerce_my_account_my_address_formatted_address', 'custom_my_account_my_address_formatted_address', 10, 3 );