內容簡介
總結:這個外掛讓使用者可以透過 WordPress REST API 查詢目前使用者在 MemberPress 的會籍狀態,並在文章端點上新增會員存取資訊。它帶來多項功能,包括會籍狀態查詢、列出目前使用者的有效產品、在所有文章端點上新增 "is_locked" 狀態欄位,以及新增可能解鎖文章所需的 MemberPress 產品清單。同時也支援 WordPress Recipe Maker 和 MemberPress 規則設定。
問題與答案:
1. 這個外掛主要提供了什麼功能?
- 答:這個外掛主要提供了查詢目前使用者在 MemberPress 的會籍狀態、列出目前使用者的有效產品、在文章端點上新增 "is_locked" 狀態欄位,以及新增解鎖文章所需的 MemberPress 產品清單的功能。
2. 外掛如何提供會員狀態查詢?
- 答:外掛提供了一個 REST API 端點,可以透過 GET /wp-json/mp-member-status/v1/me 來查詢目前使用者的會籍狀態。
3. 外掛支援的另一個功能是什麼?
- 答:外掛將 MemberPress 存取資訊添加到所有文章端點,但不會修改文章內容或存取本身。
4. 這個外掛也支援哪些 WordPress 擴充套件?
- 答:這個外掛支援 WordPress Recipe Maker 和 MemberPress 規則設定的使用。
外掛標籤
開發者團隊
② 後台搜尋「Member status API for MemberPress」→ 直接安裝(推薦)
原文外掛簡介
This plugin allows the MemberPress membership status of the current authenticated user to be exposed via the WordPress REST API:
GET /wp-json/mp-member-status/v1/me
Example response:
{
"user_id": 2,
"full_name": "John Doe",
"is_active": true,
"enabled_products": [
{
"id": 10,
"title": "Premium Membership",
"name": "premium-membership",
"url": "https://example.com/register/premium-membership/",
}
]
}
Additionally, MemberPress access information is added to all post endpoints, the post content or access itself is not modified by this plugin:
Example post response excerpt:
memberpress: {
"is_locked": true,
"products": [
{
"id": 10,
"title": "Premium Membership",
"name": "premium-membership",
"url": "https://example.com/register/premium-membership/",
"can_you_buy_me": true,
"is_subscribed": false
}
]
},
Features
Creates a REST API endpoint to fetch the MemberPress membership status of the current user.
Allows to list the active products for the current user.
Adds the Memberpress “is_locked” status field to all available post types in the REST API
Adds a list of possible Memberpress Products required to unlock posts.
Support for WordPress Recipe Maker’s and MemberPress rules set for the parent Post.
1.2.3 – 2025-09-26
Changed
Bump wordpress version
Remove member-press user role restriction
1.2.2 – 2025-01-30
Fixed
missing files
1.2.1 – 2025-01-30
Added
Split object cache durations for generic objects and user specific objects
Make object cache durations configurable in options.php
1.2.0 – 2024-06-04
Added
MemberPress plugin dependency
Active rules for the current user to the /me endpoint
Product group reference to each product
1.1.3 – 2024-05-02
Changed
Refactor all namespaces and filename prefixes
Read changelog.md for more
