Changeset 48397 for trunk/src/wp-admin/includes/class-plugin-upgrader.php
- Timestamp:
- 07/07/2020 06:58:32 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/class-plugin-upgrader.php
r48390 r48397 248 248 wp_clean_plugins_cache( $parsed_args['clear_update_cache'] ); 249 249 250 // Ensure any future auto-update failures trigger a failure email by removing the last 251 // failure notification from the list when plugins update successfully. 252 $past_failure_emails = get_option( 'auto_plugin_theme_update_emails', array() ); 253 254 if ( isset( $past_failure_emails[ $plugin ] ) ) { 255 unset( $past_failure_emails[ $plugin ] ); 256 update_option( 'auto_plugin_theme_update_emails', $past_failure_emails ); 257 } 258 250 259 return true; 251 260 } … … 371 380 remove_filter( 'upgrader_clear_destination', array( $this, 'delete_old_plugin' ) ); 372 381 382 // Ensure any future auto-update failures trigger a failure email by removing the last 383 // failure notification from the list when plugins update successfully. 384 $past_failure_emails = get_option( 'auto_plugin_theme_update_emails', array() ); 385 386 foreach ( $results as $plugin => $result ) { 387 // Maintain last failure notification when plugins failed to update manually. 388 if ( ! $result || is_wp_error( $result ) || ! isset( $past_failure_emails[ $plugin ] ) ) { 389 continue; 390 } 391 392 unset( $past_failure_emails[ $plugin ] ); 393 } 394 update_option( 'auto_plugin_theme_update_emails', $past_failure_emails ); 395 373 396 return $results; 374 397 }
Note: See TracChangeset
for help on using the changeset viewer.