diff --git a/src/wp-includes/html-api/class-wp-html-processor.php b/src/wp-includes/html-api/class-wp-html-processor.php
index ec6bf7af5d553..cbfcbdecebcbc 100644
--- a/src/wp-includes/html-api/class-wp-html-processor.php
+++ b/src/wp-includes/html-api/class-wp-html-processor.php
@@ -588,7 +588,7 @@ public function is_tag_closer() {
*
* @return bool Whether the current token is virtual.
*/
- public function is_virtual() {
+ private function is_virtual() {
return (
isset( $this->current_element->provenance ) &&
'virtual' === $this->current_element->provenance