-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Description
team51-cli/commands/WPCOM_Sites_List.php
Line 348 in 53a93be
| protected function eval_which_host( \stdClass $site ): string { |
The current approach in this function:
- uses the
is_wpcom_atomicfield returned by the wpcom /me/sites API endpoint. Note, that field is actually returned twice when calling "https://opsoasis.wpspecialprojects.com/wp-json/wpcomsp/wpcom/v1/sites/team51.blog/", once at the root and once in the options element. - If the site is Jetpack, using the jetpack element from the wpcom /me/sites API endpoint...
a. checks if the site url is in the list of pressable sites which comes from get_pressable_sites()
b. Makes a remote request to check the /.well-known/hosting-provider and looks for "Pressable", otherwise defaults Jetpack sites to "Other" - Otherwise assumes WP.com Simple
Suggest improvements:
- finish the TODO to check for "wpvip.com" in the well known hosting provider section
- I think we can identify WP.com Simple sites by looking for "wordpress.com" in the value of options.unmapped_url in the response from wpcom /me/sites API endpoint
cc: @cagrimmett if we get these done, I think we can use the results of this command as the starting point for our "who pays for what" work
Metadata
Metadata
Assignees
Labels
No labels