Skip to content

Commit

Permalink
1.0.6: Re-disable VIPs alloptions
Browse files Browse the repository at this point in the history
  • Loading branch information
srtfisher committed Apr 19, 2024
1 parent 8a2a670 commit 4c8c2dd
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## v1.0.6 - 2024-04-19

### Fixed

- Properly disabling VIP's alloptions protections during unit testing
(previously applied in v1.0.5).

## v1.0.5 - 2024-04-18

### Changed
Expand Down
5 changes: 5 additions & 0 deletions src/mantle/testing/wordpress-bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,11 @@
// Disable background updates.
tests_add_filter( 'automatic_updater_disabled', '__return_true' );

// Disable VIP's alloptions protections during unit testing.
tests_add_filter( 'vip_mu_plugins_loaded', function (): void {
remove_filter( 'pre_wp_load_alloptions', 'Automattic\\VIP\\Core\\OptionsAPI\\pre_wp_load_alloptions_protections', 999 );
} );

// Load WordPress.
require_once ABSPATH . '/wp-settings.php';

Expand Down

0 comments on commit 4c8c2dd

Please sign in to comment.