You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add new WpApiParamCommentsStatus to be used in query (#1560)
* Add failing test for the comments list status filter
* Use a request-side status type for the comments list query
WP_Comment_Query recognizes the query values approve, hold, all, and any, and treats anything else as a literal comment_approved value. The response vocabulary value approved therefore silently returned an empty result set. CommentListParams.status is now Option<WpApiParamCommentsStatus>, which also adds typed all and any values that were previously only reachable via Custom.
* Re-export WpApiParamCommentsStatus from the public Swift module
* Add changelog entry for the typed comment list status
* Cover all and any in the comment status forbidden-param test
* Fix the parent_exclude comment list case sending parent
Copy file name to clipboardExpand all lines: CHANGELOG.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -20,6 +20,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
20
20
21
21
### Changed
22
22
23
+
-**BREAKING:**`CommentListParams.status` now takes `WpApiParamCommentsStatus` instead of `CommentStatus`, fixing `status=approved` silently returning no comments and adding typed `all`/`any`. Use `.approve` in place of `Custom("approve")`.
23
24
-**BREAKING:**`product_type` fields on `Product` and `WPComProduct` changed from `String` to `ProductType`. Callers that match on or construct these values will need to wrap/unwrap with `ProductType(...)`.
24
25
-**BREAKING:** The cache now enables SQLite foreign key enforcement on every connection it prepares, and fails with `SqliteDbError::ForeignKeysUnavailable` if the setting doesn't take effect. Removing a site relies on `ON DELETE CASCADE` to clear its cached rows, so on builds where enforcement defaulted to off those rows were silently left behind.
25
26
-**BREAKING:**`ShoppingCart.coupon` changed from `String` to `CouponCode`, and `ShoppingCartCostOverride.override_code` from `String` to `CostOverrideCode`, so the shopping cart and site plans describe these values with the same types. Callers will need to wrap/unwrap with `CouponCode(...)` / `CostOverrideCode(...)`.
0 commit comments