• I need a way to get the wordpress login username of the customer/user who made the order, and preferably when it is switched from on-hold to pending buy woocommerce.

    how could i catch that? I really hopes someone knows, been bothering me for weeks now and I just cant get an answer by searching for it ??

    https://www.ads-software.com/plugins/woocommerce/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter Rurik

    (@rurik)

    Im looking for something like this:

    function mysite_woocommerce_payment_complete( $order_id ) {
        error_log( "Payment has been received for order $order_id made by $username", 0 );
    }
    add_action( 'woocommerce_payment_complete',
            'mysite_woocommerce_payment_complete' );

    But how do i get the username?

    Hi,

    I’m looking for a similar thing. I need to have the username of the customer listed on their order next to their billing/delivery details which are already listed.

    Did you manage to get anywhere?

    MT

    DS

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘How to get the username from placed order?’ is closed to new replies.