Remove object cast (https://github.com/woocommerce/woocommerce-blocks/pull/11082)
This commit is contained in:
parent
4d82186495
commit
22fd4512d8
|
@ -116,7 +116,7 @@ class Patterns extends AbstractRoute {
|
||||||
|
|
||||||
if ( ! isset( $response ) ) {
|
if ( ! isset( $response ) ) {
|
||||||
$response = $this->prepare_item_for_response(
|
$response = $this->prepare_item_for_response(
|
||||||
(object) [
|
[
|
||||||
'ai_content_generated' => true,
|
'ai_content_generated' => true,
|
||||||
],
|
],
|
||||||
$request
|
$request
|
||||||
|
|
|
@ -31,12 +31,12 @@ class PatternsSchema extends AbstractSchema {
|
||||||
/**
|
/**
|
||||||
* Get the Patterns response.
|
* Get the Patterns response.
|
||||||
*
|
*
|
||||||
* @param object $item Item to get response for.
|
* @param array $item Item to get response for.
|
||||||
*
|
*
|
||||||
* @return object
|
* @return array
|
||||||
*/
|
*/
|
||||||
public function get_item_response( $item ) {
|
public function get_item_response( $item ) {
|
||||||
return (object) [
|
return [
|
||||||
'ai_content_generated' => true,
|
'ai_content_generated' => true,
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue