From 31c8c6595907916f6c33760346b90e6a732a53c9 Mon Sep 17 00:00:00 2001 From: Sean Fisher Date: Thu, 18 Apr 2024 11:33:42 -0400 Subject: [PATCH] Disable VIP's alloptions protections during unit testing (#532) * Disable VIPs alloptions protections during unit testing * Testing CI * Swap the order to disable alloptions first --- src/mantle/testing/wordpress-bootstrap.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/mantle/testing/wordpress-bootstrap.php b/src/mantle/testing/wordpress-bootstrap.php index cd027b3c..ac17c93f 100644 --- a/src/mantle/testing/wordpress-bootstrap.php +++ b/src/mantle/testing/wordpress-bootstrap.php @@ -201,6 +201,9 @@ $_SERVER['REQUEST_TIME_FLOAT'] = (float) $_SERVER['REQUEST_TIME_FLOAT']; } +// Disable VIP's alloptions protections during unit testing. +remove_filter( 'pre_wp_load_alloptions', 'Automattic\\VIP\\Core\\OptionsAPI\\pre_wp_load_alloptions_protections', 999 ); + // Delete any default posts & related data. if ( is_blog_installed() ) { Utils::delete_all_posts();