admin管理员组文章数量:1122846
I'm using memberpress for my application, and I want to be able to get all user subscriptions in an array or object so I can manually loop them, among other functions.
I cannot, for the life of me, find any developer documentation that isn't REST API or shortcode based.
Does anyone know where I can find documentation on how to use memberpress in custom templates?
I'm using memberpress for my application, and I want to be able to get all user subscriptions in an array or object so I can manually loop them, among other functions.
I cannot, for the life of me, find any developer documentation that isn't REST API or shortcode based.
Does anyone know where I can find documentation on how to use memberpress in custom templates?
Share Improve this question asked May 6, 2019 at 16:58 S_RS_R 1635 bronze badges2 Answers
Reset to default 2I know it was asked a long time ago. But just a tip for others who see this.
You can use global $wpdb in any wordpress file to access the pre-defined class. If you know sql you can create a custom query to find active or inactive memberships from one of the memberpress tables.
For reaccuring memberships: $wpdb->prefix.'mepr_subscriptions'
For non-reaccuring: The table is $wpdb->prefix.'mepr_transactions'. It has all the past and current transactions for every user, so you would have to ensure your query only grabs the most current one.
You should consider staging the site and using phpmyadmin to set up the query.
goodluck.
I've also struggled with this in 2024. The best resource I've found is this archived git repo, with the code in.
https://github.com/wp-premium/memberpress-developer/blob/ed2d65ee4d1cdcef6b09223beb5774809fd9a20b/app/models/MeprUser.php
I've linked to the MeprUser class because that's where you can find functions like full_address() and custom_profile_fields().
本文标签: pluginsMemberpress functionsdocumentation
版权声明:本文标题:plugins - Memberpress functionsdocumentation 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1736295703a1929627.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论