WooCommerce Code Reference

Search results

WC_Post_Types

Post types Class.

Table of Contents

init() Hook in methods. mixed
register_taxonomies() Register core taxonomies. mixed
register_post_types() Register core post types. mixed
updated_term_messages() Customize taxonomies update messages. bool
register_post_status() Register our custom post statuses, used for order status. mixed
maybe_flush_rewrite_rules() Flush rules if the event is queued. mixed
flush_rewrite_rules() Flush rewrite rules. mixed
gutenberg_can_edit_post_type() Disable Gutenberg for products. bool
support_jetpack_omnisearch() Add Product Support to Jetpack Omnisearch. mixed
rest_api_allowed_post_types() Added product for Jetpack related posts. array

Methods

register_taxonomies()

Register core taxonomies.

public static register_taxonomies( ) : mixed
Return values
mixed

register_post_types()

Register core post types.

public static register_post_types( ) : mixed
Return values
mixed

updated_term_messages()

Customize taxonomies update messages.

public static updated_term_messages( $messages : array ) : bool
Parameters
$messages : array

The list of available messages.

Tags
since
Return values
bool

register_post_status()

Register our custom post statuses, used for order status.

public static register_post_status( ) : mixed
Return values
mixed

maybe_flush_rewrite_rules()

Flush rules if the event is queued.

public static maybe_flush_rewrite_rules( ) : mixed
Tags
since
Return values
mixed

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( $can_edit : bool , $post_type : string ) : 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

support_jetpack_omnisearch()

Add Product Support to Jetpack Omnisearch.

public static support_jetpack_omnisearch( ) : mixed
Return values
mixed

rest_api_allowed_post_types()

Added product for Jetpack related posts.

public static rest_api_allowed_post_types( $post_types : array ) : array
Parameters
$post_types : array

Post types.

Return values
array
Back to the top