WC_Post_Types
in package
Post types Class.
Table of Contents
- flush_rewrite_rules() : mixed
- Flush rewrite rules.
- gutenberg_can_edit_post_type() : bool
- Disable Gutenberg for products.
- init() : mixed
- Hook in methods.
- maybe_flush_rewrite_rules() : mixed
- Flush rules if the event is queued.
- register_post_status() : mixed
- Register our custom post statuses, used for order status.
- register_post_types() : mixed
- Register core post types.
- register_taxonomies() : mixed
- Register core taxonomies.
- rest_api_allowed_post_types() : array<string|int, mixed>
- Added product for Jetpack related posts.
- support_jetpack_omnisearch() : mixed
- Add Product Support to Jetpack Omnisearch.
- updated_term_messages() : bool
- Customize taxonomies update messages.
Methods
flush_rewrite_rules()
Flush rewrite rules.
public
static flush_rewrite_rules() : mixed
Return values
mixed —gutenberg_can_edit_post_type()
Disable Gutenberg for products.
public
static gutenberg_can_edit_post_type(bool $can_edit, string $post_type) : bool
Parameters
- $can_edit : bool
-
Whether the post type can be edited or not.
- $post_type : string
-
The post type being checked.
Return values
bool —init()
Hook in methods.
public
static init() : mixed
Return values
mixed —maybe_flush_rewrite_rules()
Flush rules if the event is queued.
public
static maybe_flush_rewrite_rules() : mixed
Tags
Return values
mixed —register_post_status()
Register our custom post statuses, used for order status.
public
static register_post_status() : mixed
Return values
mixed —register_post_types()
Register core post types.
public
static register_post_types() : mixed
Return values
mixed —register_taxonomies()
Register core taxonomies.
public
static register_taxonomies() : mixed
Return values
mixed —rest_api_allowed_post_types()
Added product for Jetpack related posts.
public
static rest_api_allowed_post_types(array<string|int, mixed> $post_types) : array<string|int, mixed>
Parameters
- $post_types : array<string|int, mixed>
-
Post types.
Return values
array<string|int, mixed> —support_jetpack_omnisearch()
Add Product Support to Jetpack Omnisearch.
public
static support_jetpack_omnisearch() : mixed
Return values
mixed —updated_term_messages()
Customize taxonomies update messages.
public
static updated_term_messages(array<string|int, mixed> $messages) : bool
Parameters
- $messages : array<string|int, mixed>
-
The list of available messages.