WC_Post_Types::rest_api_allowed_post_types()
Added product for Jetpack related posts.
Method of the class: WC_Post_Types{}
No Hooks.
Returns
Array
.
Usage
$result = WC_Post_Types::rest_api_allowed_post_types( $post_types );
- $post_types(array) (required)
- Post types.
WC_Post_Types::rest_api_allowed_post_types() WC Post Types::rest api allowed post types code WC 9.8.5
public static function rest_api_allowed_post_types( $post_types ) { $post_types[] = 'product'; return $post_types; }