Skip to content

Instantly share code, notes, and snippets.

@tribulant
Created August 1, 2014 10:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tribulant/56a20070b83a0758650a to your computer and use it in GitHub Desktop.
Save tribulant/56a20070b83a0758650a to your computer and use it in GitHub Desktop.
Checkout: Action - checkout_order_finished Example
<?php
function order_finished($order_id = null, $pmethod = null, $paid = null) {
//an order was finished, now we can do something with it
if ($order = wpco_get_order($order_id)) {
//we now have all the data of the order to work with
//print_r($order);
}
}
add_action('checkout_order_finished', 'order_finished', 10, 3);
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment