Skip to content

Commit 57210e4

Browse files
committed
Changes the API URL to use the most current one (adds /hosting to the REST API url)
1 parent 94a1922 commit 57210e4

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

includes/functions-wpcom.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -544,7 +544,7 @@ function wait_until_jetpack_token_regenerated( string $site_id_or_url, OutputInt
544544
*/
545545
function create_wpcom_site_code_deployment( string $site_id_or_url, string $external_repository_id, string $branch_name, string $target_dir, ?array $params = null ): ?stdClass {
546546
return API_Helper::make_wpcom_request(
547-
"sites/$site_id_or_url/code-deployments",
547+
"sites/$site_id_or_url/hosting/code-deployments",
548548
'POST',
549549
array(
550550
'external_repository_id' => $external_repository_id,
@@ -564,7 +564,7 @@ function create_wpcom_site_code_deployment( string $site_id_or_url, string $exte
564564
* @return stdClass|null
565565
*/
566566
function create_wpcom_site_code_deployment_run( string $site_id_or_url, string $code_deployment_id ): ?stdClass {
567-
return API_Helper::make_wpcom_request( "sites/$site_id_or_url/code-deployments/$code_deployment_id/runs", 'POST' );
567+
return API_Helper::make_wpcom_request( "sites/$site_id_or_url/hosting/code-deployments/$code_deployment_id/runs", 'POST' );
568568
}
569569

570570
/**
@@ -575,7 +575,7 @@ function create_wpcom_site_code_deployment_run( string $site_id_or_url, string $
575575
* @return stdClass[]|null
576576
*/
577577
function get_wpcom_site_code_deployments( string $site_id_or_url ): ?array {
578-
return API_Helper::make_wpcom_request( "sites/$site_id_or_url/code-deployments" )?->records;
578+
return API_Helper::make_wpcom_request( "sites/$site_id_or_url/hosting/code-deployments" )?->records;
579579
}
580580

581581
/**

0 commit comments

Comments
 (0)