Skip to content

Instantly share code, notes, and snippets.

View shrikeit's full-sized avatar

Peter shrikeit

  • Salt Lake City, UT
View GitHub Profile
@corsonr
corsonr / functions.php
Created April 3, 2018 11:36
Get WooCommerce order details
<?php
$order->get_data(); (not needed is using the code above)
$order_id = $order_data['id'];
$order_parent_id = $order_data['parent_id'];
$order_status = $order_data['status'];
$order_currency = $order_data['currency'];
$order_version = $order_data['version'];
$order_payment_method = $order_data['payment_method'];
$order_payment_method_title = $order_data['payment_method_title'];
@corsonr
corsonr / available_fields.php
Last active October 4, 2022 11:24
WooCommerce Stripe: add custom meta data to send to stripe
<?php
$order->get_data(); (not needed is using the code above)
$order_id = $order_data['id'];
$order_parent_id = $order_data['parent_id'];
$order_status = $order_data['status'];
$order_currency = $order_data['currency'];
$order_version = $order_data['version'];
$order_payment_method = $order_data['payment_method'];
$order_payment_method_title = $order_data['payment_method_title'];
@norm
norm / checksoftwareupdate
Created February 24, 2010 23:49
wrapper around 'softwareupdate -l' to silence it when no updates exist
#!/bin/sh
#
# wrapper around 'softwareupdate -l' to silence it when no updates exist
# -- Mark Norman Francis <[email protected]>
OUTPUT=`mktemp /tmp/checksoftup.XXXXX`
ERRORS=`mktemp /tmp/checksoftup.XXXXX`
# capture output to separate files
softwareupdate -l >$OUTPUT 2>$ERRORS