diff --git a/plugins/woocommerce-admin/includes/api/class-wc-admin-rest-admin-notes-controller.php b/plugins/woocommerce-admin/includes/api/class-wc-admin-rest-admin-notes-controller.php index c024e07f603..fe0ba79cbec 100644 --- a/plugins/woocommerce-admin/includes/api/class-wc-admin-rest-admin-notes-controller.php +++ b/plugins/woocommerce-admin/includes/api/class-wc-admin-rest-admin-notes-controller.php @@ -257,6 +257,7 @@ class WC_Admin_REST_Admin_Notes_Controller extends WC_REST_CRUD_Controller { $data['date_reminder'] = wc_rest_prepare_date_response( $data['date_reminder'], false ); $data['title'] = stripslashes( $data['title'] ); $data['content'] = stripslashes( $data['content'] ); + $data['is_snoozable'] = (bool) $data['is_snoozable']; foreach ( (array) $data['actions'] as $key => $value ) { $data['actions'][ $key ]->label = stripslashes( $data['actions'][ $key ]->label ); $data['actions'][ $key ]->url = $this->prepare_query_for_response( $data['actions'][ $key ]->query ); @@ -405,6 +406,12 @@ class WC_Admin_REST_Admin_Notes_Controller extends WC_REST_CRUD_Controller { 'context' => array( 'view', 'edit' ), 'readonly' => true, ), + 'is_snoozable' => array( + 'description' => __( 'Whether or a user can request to be reminded about the note.', 'woocommerce-admin' ), + 'type' => 'boolean', + 'context' => array( 'view', 'edit' ), + 'readonly' => true, + ), 'actions' => array( 'description' => __( 'An array of actions, if any, for the note.', 'woocommerce-admin' ), 'type' => 'array',