Updates an existing membership.
OPTIONS OPTIONS
- <id>
- The id for the resource.
- [--id=<id>]
- Unique identifier for the resource.
- [--date_created=<date_created>]
- Creation date. Format: Y-m-d H:i:s
- [--date_created_gmt=<date_created_gmt>]
- Creation date (in GMT). Format: Y-m-d H:i:s
- [--menu_order=<menu_order>]
- Creation date (in GMT). Format: Y-m-d H:i:s
- [--title=<title>]
- Post title.
- [--content=<content>]
- The HTML content of the post.
- [--excerpt=<excerpt>]
- The HTML excerpt of the post.
- [--slug=<slug>]
- Post URL slug.
- [--status=<status>]
- The publication status of the post.
---
options:
– publish
– future
– draft
– pending
– private
--- - [--password=<password>]
- Password used to protect access to the content.
- [--featured_media=<featured_media>]
- Featured image ID.
- [--comment_status=<comment_status>]
- Post comment status. Default comment status dependent upon general WordPress post discussion settings.
---
options:
– open
– closed
--- - [--ping_status=<ping_status>]
- Post ping status. Default ping status dependent upon general WordPress post discussion settings.
---
options:
– open
– closed
--- - [--auto_enroll=<auto_enroll>]
- List of courses to automatically enroll students into when they’re enrolled into the membership.
- [--catalog_visibility=<catalog_visibility>]
- Visibility of the membership in catalogs and search results.
---
options:
– catalog_search
– catalog
– search
– hidden
--- - [--categories=<categories>]
- List of membership categories.
- [--instructors=<instructors>]
- List of post instructors. Defaults to current user when creating a new post.
- [--restriction_action=<restriction_action>]
- Determines the action to take when content restricted by the membership is accessed by a non-member. –
none
: Remain on page and display the messagerestriction_message
. –membership
: Redirect to the membership’s permalink. –page
: Redirect to the permalink of the page identified byrestriction_page_id
. –custom
: Redirect to the URL identified byrestriction_url
.
---
options:
– none
– membership
– page
– custom
--- - [--restriction_message=<restriction_message>]
- Message to display to non-members after a
restriction_action
redirect. Whenrestriction_action
isnone
replaces the page content with this message. - [--restriction_page_id=<restriction_page_id>]
- WordPress page ID used for redirecting non-members when
restriction_action
ispage
. - [--restriction_url=<restriction_url>]
- URL used for redirecting non-members when
restriction_action
iscustom
. - [--sales_page_page_id=<sales_page_page_id>]
- The WordPress page ID of the sales page. Required when
sales_page_type
equalspage
. Only returned when thesales_page_type
equalspage
. - [--sales_page_type=<sales_page_type>]
- Defines alternate content displayed to visitors and non-enrolled students when accessing the post. –
none
displays the post content. –content
displays alternate content from theexcerpt
property. –page
redirects to the WordPress page defined incontent_page_id
. –url
redirects to the URL defined incontent_page_url
.
---
options:
– none
– content
– page
– url
--- - [--sales_page_url=<sales_page_url>]
- The URL of the sales page content. Required when
sales_page_type
equalsurl
. Only returned when thesales_page_type
equalsurl
. - [--tags=<tags>]
- List of membership tags.
- [--porcelain]
- Output just the id when the operation is successful.
GLOBAL PARAMETERS GLOBAL PARAMETERS
These global parameters have the same behavior across all commands and affect how WP-CLI interacts with WordPress.
Argument | Description |
---|---|
--path=<path> |
Path to the WordPress files. |
--url=<url> |
Pretend request came from given URL. In multisite, this argument is how the target site is specified. |
--ssh=[<scheme>:][<user>@]<host\|container>[:<port>][<path>] |
Perform operation against a remote server over SSH (or a container using scheme of “docker”, “docker-compose”, “vagrant”). |
--http=<http> |
Perform operation against a remote WordPress installation over HTTP. |
--user=<id\|login\|email> |
Set the WordPress user. |
--skip-plugins[=<plugins>] |
Skip loading all plugins, or a comma-separated list of plugins. Note: mu-plugins are still loaded. |
--skip-themes[=<themes>] |
Skip loading all themes, or a comma-separated list of themes. |
--skip-packages |
Skip loading all installed packages. |
--require=<path> |
Load PHP file before running the command (may be used more than once). |
--exec=<php-code> |
Execute PHP code before running the command (may be used more than once). |
--[no-]color |
Whether to colorize the output. |
--debug[=<group>] |
Show all PHP errors and add verbosity to WP-CLI output. Built-in groups include: bootstrap, commandfactory, and help. |
--prompt[=<assoc>] |
Prompt the user to enter values for all command arguments, or a subset specified as comma-separated values. |
--quiet |
Suppress informational messages. |