Advertisement
shelob9

Untitled

Jul 31st, 2016
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.28 KB | None | 0 0
  1. add_filter( 'woocommerce_order_status_completed', function( $order_id ){
  2. if( class_exists( 'WP_Papertrail_API' ) ){
  3. WP_Papertrail_API::log(
  4. [
  5. 'details' => WC_API_Orders::get_order( $order_id ),
  6. 'order-id' => $order_id
  7. ], 'new_order' );
  8. }
  9. return $order_id;
  10. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement