Skip to content

Instantly share code, notes, and snippets.

@kilbot
Last active August 29, 2015 14:14
Show Gist options
  • Save kilbot/cd978bc863ee1968c4b8 to your computer and use it in GitHub Desktop.
Save kilbot/cd978bc863ee1968c4b8 to your computer and use it in GitHub Desktop.
Add to the theme functions.php file
function log_new_orders() {
error_reporting(0);
$log = new WC_Logger();
$log->add('woocommerce-pos', print_r(debug_backtrace(), true));
}
add_action( 'save_post_shop_order', 'log_new_orders' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment