public static function rest_api_allowed_post_types($post_types) { $post_types[] = 'product'; return $post_types; }