Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: minor
Type: changed

Plugin Conflicts Guardian: pcg_guard_updates now defaults to true, enabling the post-update health check and rollback flow by default.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Pre-flight plugin-activation check. When an admin clicks Activate (or finishes a
Two independent filters:

- `pcg_guard_activation` — enables the activation probe and the syntax-only install/update gate. Defaults `true`.
- `pcg_guard_updates` — enables the post-update health check + rollback flow. Defaults `false`.
- `pcg_guard_updates` — enables the post-update health check + rollback flow. Defaults `true`.

## Files

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,7 @@ function pcg_maybe_handle_probe() {
// pull in the other as an unintended dependency.
$is_update_mode = PCG_Load_Tester::MODE_UPDATE === $mode;
$gate_filter = $is_update_mode ? 'pcg_guard_updates' : 'pcg_guard_activation';
$gate_default = ! $is_update_mode;
if ( ! apply_filters( $gate_filter, $gate_default ) ) {
if ( ! apply_filters( $gate_filter, true ) ) {
pcg_probe_bail_error( 'Plugin Conflicts Guardian is disabled.', 403 );
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
* @return bool|WP_Error Passed through unchanged.
*/
function pcg_healthcheck_capture_snapshot( $return, $hook_extra ) {
if ( ! apply_filters( 'pcg_guard_updates', false ) ) {
if ( ! apply_filters( 'pcg_guard_updates', true ) ) {
return $return;
}
if ( ! pcg_healthcheck_is_plugin_pre_install_update( $hook_extra ) ) {
Expand Down Expand Up @@ -66,7 +66,7 @@ function pcg_healthcheck_capture_snapshot( $return, $hook_extra ) {
* @return void
*/
function pcg_healthcheck_after_update( $upgrader, $hook_extra ) { // phpcs:ignore Generic.CodeAnalysis.UnusedFunctionParameter.FoundAfterLastUsed -- $upgrader is the WP-Upgrader-supplied argument; we accept it for the action signature.
if ( ! apply_filters( 'pcg_guard_updates', false ) ) {
if ( ! apply_filters( 'pcg_guard_updates', true ) ) {
return;
}
if ( ! pcg_healthcheck_is_plugin_update( $hook_extra ) ) {
Expand Down
Loading