diff --git a/includes/api/class-wc-rest-order-notes-controller.php b/includes/api/class-wc-rest-order-notes-controller.php index 3b1ea077ad0..242dada4125 100644 --- a/includes/api/class-wc-rest-order-notes-controller.php +++ b/includes/api/class-wc-rest-order-notes-controller.php @@ -310,7 +310,7 @@ class WC_REST_Order_Notes_Controller extends WC_REST_Controller { */ public function prepare_item_for_response( $note, $request ) { $data = array( - 'id' => $note->comment_ID, + 'id' => (int) $note->comment_ID, 'date_created' => wc_rest_prepare_date_response( $note->comment_date_gmt ), 'note' => $note->comment_content, 'customer_note' => (bool) get_comment_meta( $note->comment_ID, 'is_customer_note', true ),