Make WordPress Core

Changeset 58285


Ignore:
Timestamp:
06/02/2024 09:33:54 PM (10 months ago)
Author:
TimothyBlynJacobs
Message:

Upgrade: Fix the disable_autoupdate flag logic.

In #50824 support was added for a package to include a disable_autoupdate flag to indicate that the plugin/theme should not be auto-updated even if a user had opted-in via the WP-Admin UI. However, the logic implementing the flag was inverted.

This commit repairs the logic. If a package has disable_autoupdate set, then it should not be auto-updated.

Props amisiewicz.
Fixes #52796.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/class-wp-automatic-updater.php

    r58139 r58285  
    234234        // If the `disable_autoupdate` flag is set, override any user-choice, but allow filters.
    235235        if ( ! empty( $item->disable_autoupdate ) ) {
    236             $update = $item->disable_autoupdate;
     236            $update = false;
    237237        }
    238238
Note: See TracChangeset for help on using the changeset viewer.