Last active
October 1, 2018 10:48
-
-
Save grola/2a075843f7af357a3d6e718ba4b15a66 to your computer and use it in GitHub Desktop.
Stack trace on order completed
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_action( 'woocommerce_order_status_completed', 'test_woocommerce_order_status_completed'); | |
function test_woocommerce_order_status_completed( $order_id ) { | |
$order = wc_get_order( $order_id ); | |
$order->add_order_note( print_r( debug_backtrace(), true ) ); | |
$order->save(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment