Home › Support › General › HivePress › How to get the package of the user
I’d like to have an easy-way to get the name of the package regardless of the user is logged in or not, where i cant find it out on mysql, php, what Listing Package a Vendor has subscribed?
How i get the listing packages name of a logged-in user?
Not using the methods/functions in PHP or MYSQL in the Featured-Plugin
Pls get me the code for $user_listing_package->get_name();
or where i can find it
If you’re familiar with PHP please check the extension source code, here’s a block that displays user’s packages https://github.com/hivepress/hivepress-paid-listings/blob/master/includes/blocks/class-user-listing-packages.php Packages are stored as hidden comments of “hp_listing_package” type, so you can also get them with get_comments https://developer.wordpress.org/reference/functions/get_comments/ but I recommend using HivePress API instead.
You must be logged in to reply to this topic.