- This topic has 2 replies, 2 voices, and was last updated 6 years, 8 months ago by .
Viewing 3 posts - 1 through 3 (of 3 total)
Viewing 3 posts - 1 through 3 (of 3 total)
- You must be logged in to reply to this topic.
Support site for Tips and Tricks HQ premium products
by
Tips and Tricks HQ Support Portal › Forums › WP eStore Forum › eStore & Software License Manager – display license key in purchase history
It’s not a customization request, I only want to find out if someone else did this.
I’m using eStore, eMember and Software License Manager plugins for selling digital products with a license key. I would like to present to the members a purchase history page with as many details as possible, including the license key that was generated upon the purchase.
I know about the shortcode [wp_eStore_members_purchase_history_with_download], but I didn’t find a way to add the license key to the listing. I don’t mind writing PHP code, but I don’t even know where to start with my research. Could you put me on the right track, please?
Thank you.
eStore actually doesn’t do anything for the license stuff. The License Manager plugin uses eStore’s hooks to get notified of a transaction. It then creates a license if the product uses license.
Everything to do with the license manager stuff is contained within the license manager plugin. So your best option would be to create a NEW custom shortcode that queries the appropriate database tables and shows the data however you want to show it.
Here is a rough idea of how I would do it most likely:
1) Get the currently logged in member’s ID
https://www.tipsandtricks-hq.com/wordpress-membership/wp-emember-miscellaneous-tweaks-248
2) Use that member ID to query estore’s customers table to find all the transactions from that member.
3) You can then use the transaction ID to match with the license table to see if that member has any license keys and display them.
Thak you so much for the reply, this is definitely a starting point! I pretty much understand how to query a table in WP, I’ll look into it.