Automattic / jetpack

Security, performance, marketing, and design tools — Jetpack is made by WordPress experts to make WP sites safer and faster, and help you grow your traffic.
https://jetpack.com/
Other
1.58k stars 797 forks source link

API: Remove IS_WPCOM conditional before wpcom_json_api_request_as_blog #17646

Open scruffian opened 3 years ago

scruffian commented 3 years ago

Now that wpcom_json_api_request_as_blog contains an abstraction to call the WP.com API directly when running on WP.com we no longer need to add IS_WPCOM conditionals before calling wpcom_json_api_request_as_blog. Instead we can simply remove all of the IS_WPCOM code block and call wpcom_json_api_request_as_blog in both environments.

I have managed to find 4 instances in the code where this needs updating:

See p7H4VZ-2LY-p2 and #15468 for details.

jeherve commented 3 years ago

class-wpcom-rest-api-v2-endpoint-mailchimp.php

Related: D35555-code