From f1cabba6355e295727cffc74ba0d7f138ecc26e7 Mon Sep 17 00:00:00 2001
From: Timur Karimov <timur.karimow.95@gmail.com>
Date: Wed, 20 Dec 2023 20:47:57 +0100
Subject: [PATCH] Add empty file to avoid fatals (#7936)

Co-authored-by: Timur Karimov <timurkarimov@timurs-macbook-pro.home>
Co-authored-by: Brett Shumaker <brettshumaker@gmail.com>
---
 changelog/revert-file-needed-for-plugin-update   |  5 +++++
 .../class-wc-rest-upe-flag-toggle-controller.php | 16 ++++++++++++++++
 2 files changed, 21 insertions(+)
 create mode 100644 changelog/revert-file-needed-for-plugin-update
 create mode 100644 includes/admin/class-wc-rest-upe-flag-toggle-controller.php

diff --git a/changelog/revert-file-needed-for-plugin-update b/changelog/revert-file-needed-for-plugin-update
new file mode 100644
index 00000000000..f4e5d1e3224
--- /dev/null
+++ b/changelog/revert-file-needed-for-plugin-update
@@ -0,0 +1,5 @@
+Significance: patch
+Type: dev
+Comment: This is the file revert to avoid failures on plugin update. This is a temporary solution. Both removal & revert happen on develop meaning there is no change to the outside world.
+
+
diff --git a/includes/admin/class-wc-rest-upe-flag-toggle-controller.php b/includes/admin/class-wc-rest-upe-flag-toggle-controller.php
new file mode 100644
index 00000000000..bc476de7731
--- /dev/null
+++ b/includes/admin/class-wc-rest-upe-flag-toggle-controller.php
@@ -0,0 +1,16 @@
+<?php
+/**
+ * Class WC_REST_UPE_Flag_Toggle_Controller
+ *
+ * @package WooCommerce\Payments\Admin
+ */
+
+/**
+ * REST controller for UPE feature flag. Needs to stay in the codebase to avoid error on plugin update for versions 6.9.2 or earlier.
+ */
+class WC_REST_UPE_Flag_Toggle_Controller extends WP_REST_Controller {
+	/**
+	 * Register routes.
+	 */
+	public function register_routes() {}
+}