Opened 11 years ago
Closed 11 years ago
#25841 closed enhancement (fixed)
Action to occur after Automatic Updates have finished
Reported by: | pento | Owned by: | dd32 |
---|---|---|---|
Milestone: | 3.8 | Priority: | normal |
Severity: | normal | Version: | 3.7 |
Component: | Upgrade/Install | Keywords: | has-patch |
Focuses: | Cc: |
Description
After an automatic update finishes, it'd be good to have an action trigger.
I see it being particularly useful for site owners who'd like to run some automated tests after the update, to ensure everything is running properly.
Attachments (2)
Change History (10)
#3
@
11 years ago
On second thoughts, yes. It's an array of arrays of mixed, it's probably saner to go with the first level.
#4
@
11 years ago
- Owner set to dd32
- Resolution set to fixed
- Status changed from new to closed
In 26155:
#5
@
11 years ago
- Resolution fixed deleted
- Status changed from closed to reopened
I could go either way on this, but — should this hook fire only when there are update results? If there is nothing to update, and there was never actually an update performed, then "complete" is kind of ambiguous.
The filter description is perfect for what [26155] adds, but firing this hook every 12 hours is probably not very intuitive. Maybe move it to within the ! empty( $this->update_results )
branch above it that sends the debug email.
#6
@
11 years ago
I can go either way on it as well. On one hand I felt like it should go into the if statement, on the other it seemed like it's correct in saying the auto update stuff has completed.
Perhaps we should just put it in the if after all.
#7
@
11 years ago
If someone really wanted to catch every auto update attempt, they could always hook into wp_maybe_auto_update at priority > 10. A simple is_disabled() check in a callback there will cover the major case where the hook in [26155] would not fire (another is not receiving the lock). Ultimately I just doubt it is a compelling hook when it always fires.
Another use: Automatic Updates doesn't send emails for plugin/theme updates (unless you have debug emails enabled). It'd be good to be able to send emails for them, too.