-
Notifications
You must be signed in to change notification settings - Fork 272
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix the wp_http_supports( array( 'ssl' ) ) function (#819)
Gets the `wp_http_supports()` function to return true when the `fetch()` http transport is available. ## Rationale `wp_http_supports` checks whether an HTTP tranport with the requests capabilities is available. However, it does so using the `_get_first_available_transport()` function which sources its knowledge about HTTP transport from the `http_api_transports` filter. Therefore, we must hook into that filter and also rename the `Requests_Transport_Fetch` class to use the class name pattern expected by `_get_first_available_transport()`, which is `Wp_Http_*` ## Testing instructions: This PR ships a new E2E test – confirm it passes. ## Follow-up work Turn the e2e test into a unit test once WordPress data modules are easily available for import.
- Loading branch information
Showing
4 changed files
with
49 additions
and
9 deletions.
There are no files selected for viewing
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
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