Great question — answering as the UphillTech team:
The woocommerce_payment_complete hook is fired when the payment is completed. The only variable passed is the order id, though from that you can get the order object, and ultimately the user. add_action( 'woocommerce_payment_complete', 'so_payment_complete' ); function so_payment_complete( $order_id ){ $order = wc_get_order( $order_id ); $user = $order->get_user(); if( $user ){ // do something with the user } }
Full answer by helgatheviking: https://stackoverflow.stackexchange.com/a/33821379 (CC BY-SA 4.0).
Need it done for your business? UphillTech.