{"id":399964,"date":"2024-05-09T08:00:00","date_gmt":"2024-05-09T08:00:00","guid":{"rendered":"https:\/\/www.weixiaoduo.com\/plugins\/member-status-for-memberpress\/"},"modified":"2025-09-26T18:47:00","modified_gmt":"2025-09-26T18:47:00","slug":"member-status-for-memberpress","status":"publish","type":"post","link":"https:\/\/www.weixiaoduo.com\/plugins\/member-status-for-memberpress\/","title":{"rendered":"Member status API for MemberPress"},"content":{"rendered":"<p>This plugin allows the MemberPress membership status of the current authenticated user to be exposed via the WordPress REST API:<\/p>\n<p>GET \/wp-json\/mp-member-status\/v1\/me<\/p>\n<p>Example response:<\/p>\n<pre><code>{\n  \"user_id\": 2,\n  \"full_name\": \"John Doe\",\n  \"is_active\": true,\n  \"enabled_products\": [\n    {\n      \"id\": 10,\n      \"title\": \"Premium Membership\",\n      \"name\": \"premium-membership\",\n      \"url\": \"https:\/\/example.com\/register\/premium-membership\/\",\n    }\n  ]\n}\n<\/code><\/pre>\n<p>Additionally, MemberPress access information is added to all post endpoints, the post content or access itself is not modified by this plugin:<\/p>\n<p>Example post response excerpt:<\/p>\n<pre><code>memberpress: {\n               \"is_locked\": true,\n               \"products\": [\n                 {\n                   \"id\": 10,\n                   \"title\": \"Premium Membership\",\n                   \"name\": \"premium-membership\",\n                   \"url\": \"https:\/\/example.com\/register\/premium-membership\/\",\n                   \"can_you_buy_me\": true,\n                   \"is_subscribed\": false\n                 }\n               ]\n},\n<\/code><\/pre>\n<h3>Features<\/h3>\n<ul>\n<li>Creates a REST API endpoint to fetch the MemberPress membership status of the current user.<\/li>\n<li>Allows to list the active products for the current user.<\/li>\n<li>Adds the Memberpress \u201cis_locked\u201d status field to all available post types in the REST API<\/li>\n<li>Adds a list of possible Memberpress Products required to unlock posts.<\/li>\n<li>Support for WordPress Recipe Maker\u2019s and MemberPress rules set for the parent Post.<\/li>\n<\/ul>\n<h3>1.2.3 \u2013 2025-09-26<\/h3>\n<h3>Changed<\/h3>\n<ul>\n<li>Bump wordpress version<\/li>\n<li>Remove member-press user role restriction<\/li>\n<\/ul>\n<h3>1.2.2 \u2013 2025-01-30<\/h3>\n<h3>Fixed<\/h3>\n<ul>\n<li>missing files<\/li>\n<\/ul>\n<h3>1.2.1 \u2013 2025-01-30<\/h3>\n<h3>Added<\/h3>\n<ul>\n<li>Split object cache durations for generic objects and user specific objects<\/li>\n<li>Make object cache durations configurable in options.php<\/li>\n<\/ul>\n<h3>1.2.0 \u2013 2024-06-04<\/h3>\n<h3>Added<\/h3>\n<ul>\n<li>MemberPress plugin dependency<\/li>\n<li>Active rules for the current user to the \/me endpoint<\/li>\n<li>Product group reference to each product<\/li>\n<\/ul>\n<h3>1.1.3 \u2013 2024-05-02<\/h3>\n<h3>Changed<\/h3>\n<ul>\n<li>Refactor all namespaces and filename prefixes<\/li>\n<\/ul>\n<p><em>Read changelog.md for more<\/em><\/p>\n","protected":false},"excerpt":{"rendered":"<p>This plugin extends the WordPress REST API with MemberPress membership and product data within the current user context.<\/p>\n","protected":false},"author":65,"featured_media":399965,"comment_status":"open","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"slim_seo":{"title":"Member status API for MemberPress - \u8587\u6653\u6735\u63d2\u4ef6\u76ee\u5f55","description":"This plugin extends the WordPress REST API with MemberPress membership and product data within the current user context."},"footnotes":""},"categories":[1],"tags":[461,1700,54991,1473,54992],"class_list":["post-399964","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-uncategorized","tag-api","tag-memberpress","tag-recipemaker","tag-rest","tag-wprm"],"_links":{"self":[{"href":"https:\/\/www.weixiaoduo.com\/plugins\/wp-json\/wp\/v2\/posts\/399964","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.weixiaoduo.com\/plugins\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.weixiaoduo.com\/plugins\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.weixiaoduo.com\/plugins\/wp-json\/wp\/v2\/users\/65"}],"replies":[{"embeddable":true,"href":"https:\/\/www.weixiaoduo.com\/plugins\/wp-json\/wp\/v2\/comments?post=399964"}],"version-history":[{"count":0,"href":"https:\/\/www.weixiaoduo.com\/plugins\/wp-json\/wp\/v2\/posts\/399964\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.weixiaoduo.com\/plugins\/wp-json\/wp\/v2\/media\/399965"}],"wp:attachment":[{"href":"https:\/\/www.weixiaoduo.com\/plugins\/wp-json\/wp\/v2\/media?parent=399964"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.weixiaoduo.com\/plugins\/wp-json\/wp\/v2\/categories?post=399964"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.weixiaoduo.com\/plugins\/wp-json\/wp\/v2\/tags?post=399964"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}