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