Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Contributor Brian Mutende

    (@picocodes)

    Try the following SQL code. The next update will include a function to do this.

    SELECT DISTINCT wp_posts.post_author FROM wp_posts INNER JOIN wp_getpaid_invoice_items ON wp_posts.ID=wp_getpaid_invoice_items.post_id AND wp_getpaid_invoice_items.item_id=165;

    You can, however, use the following function to check if a user has purchase a given item.

    getpaid_has_user_purchased_item(165);

    Replace 165 with the item ID.

    Thread Starter kmcwepc

    (@kmcwepc)

    That’s great thank you ?? Do you know approximately when the next update will come out? Also, are you planning on implementing the ability to set a variable price for an item based on the user’s role?

    Thread Starter kmcwepc

    (@kmcwepc)

    Just to add an interim solution for anyone who’s looking to do this. This snippet will add a meta box to each item that shows associated invoices:

    https://gist.github.com/aayla-secura/40ea9c2da127914774743987ae209bc7

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘How to get a list of customers who’ve purchased an item’ is closed to new replies.