CYS - Remove usage of `prepare_item_for_response` function in `Images` endpoint (#50923)

* Remove usage of `prepare_item_for_response` function

* Add changefile(s) from automation for the following project(s): woocommerce

---------

Co-authored-by: github-actions <github-actions@github.com>
This commit is contained in:
Alba Rincón 2024-08-26 09:58:54 +02:00 committed by GitHub
parent e6b1cac49c
commit 9e40710482
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 8 additions and 7 deletions

View File

@ -0,0 +1,4 @@
Significance: minor
Type: fix
CYS - Remove usage of `prepare_item_for_response` function in `Images` endpoint.

View File

@ -65,13 +65,10 @@ class Images extends AIEndpoint {
if ( $last_business_description === $business_description ) {
return rest_ensure_response(
$this->prepare_item_for_response(
array(
'ai_content_generated' => true,
'images' => array(),
),
$request
)
array(
'ai_content_generated' => true,
'images' => array(),
),
);
}