WooCommerce - excelling eCommerce
How to get the username from placed order? (3 posts)

  1. Rurik
    Posted 1 year ago #

    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 :(


  2. Rurik
    Posted 1 year ago #

    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?

  3. Rican UK
    Posted 1 year ago #


    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?



Topic Closed

This topic has been closed to new replies.

About this Plugin

  • WooCommerce - excelling eCommerce
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic