-
Notifications
You must be signed in to change notification settings - Fork 797
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Scheduled Updates: Check if load function exists before using it. (#3…
…7081) * Scheduled Updates: Check if load function exists before using it. In #36915 we introduced an alternative load path for the endpoint file, which can lead to undefined function errors when loaded outside of the context of Jetpack. * Fix up versions * Remove unneeded collection callback It doesn't do anything currently and creates fatal errors when update-schedules endpoints get called internally. Let's just remove it for now. * Only call rest_get_server() if we're in a REST API request.
- Loading branch information
Showing
3 changed files
with
17 additions
and
7 deletions.
There are no files selected for viewing
4 changes: 4 additions & 0 deletions
4
projects/packages/scheduled-updates/changelog/add-function-exists-check
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
Significance: patch | ||
Type: added | ||
|
||
Adds an exists check before using wpcom_rest_api_v2_load_plugin() in the API endpoint. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters