Description
Adds a membership requirement to a post.
Parameters
$membership_meta
(string) (required) The membership’s meta key.
$post_id
(int) (required) The post ID
Notes
- Used for adding an individual membership to an individual post.
- For adding a membership to multiple posts in a single step, use
wpmem_add_membership_to_posts( $membership_meta, $post_ids )
.
Changelog
- Introduced in version 3.4.6
Source
wpmem_add_membership_to_post() is located in /includes/api/api-products.php