Parent
Part of the WC status normalization initiative that supersedes closed PRD issue #18.
What to build
Add a dontSeeOrderInDatabase() assertion to the order method surface, closing an API parity gap: SubscriptionMethods already exposes dontSeeSubscriptionInDatabase(), but orders have no equivalent.
The method asserts that no order row matches the given criteria. It mirrors the existing seeOrderInDatabase() / dontSeeSubscriptionInDatabase() pattern end-to-end: resolve the order table name from the storage layer, map the storage-agnostic criteria through orderStorage()->mapCriteria(), and delegate the negative assertion to the underlying WPDB module.
Because the criteria pass through orderStorage()->mapCriteria(), this method inherits status normalization for free from the normalizeStatusInCriteria() chokepoint introduced in #21. No normalization logic is added here — dontSeeOrderInDatabase(['status' => 'cancelled']) resolves to the canonical wc-cancelled form automatically. This is why the slice is blocked by #21.
It supports the same storage-agnostic keys as seeOrderInDatabase (id, status, etc.) and works under both Legacy and HPOS storage.
Acceptance criteria
Blocked by
Parent
Part of the WC status normalization initiative that supersedes closed PRD issue #18.
What to build
Add a
dontSeeOrderInDatabase()assertion to the order method surface, closing an API parity gap:SubscriptionMethodsalready exposesdontSeeSubscriptionInDatabase(), but orders have no equivalent.The method asserts that no order row matches the given criteria. It mirrors the existing
seeOrderInDatabase()/dontSeeSubscriptionInDatabase()pattern end-to-end: resolve the order table name from the storage layer, map the storage-agnostic criteria throughorderStorage()->mapCriteria(), and delegate the negative assertion to the underlying WPDB module.Because the criteria pass through
orderStorage()->mapCriteria(), this method inherits status normalization for free from thenormalizeStatusInCriteria()chokepoint introduced in #21. No normalization logic is added here —dontSeeOrderInDatabase(['status' => 'cancelled'])resolves to the canonicalwc-cancelledform automatically. This is why the slice is blocked by #21.It supports the same storage-agnostic keys as
seeOrderInDatabase(id,status, etc.) and works under both Legacy and HPOS storage.Acceptance criteria
OrderMethodsexposespublic function dontSeeOrderInDatabase(array $criteria): void, delegating via the order storage's table name andmapCriteria()to the WPDB negative assertion — mirroringdontSeeSubscriptionInDatabase.@exampleand a@paramdescription consistent with the surrounding order assertion methods.vendor/bin/codecept buildhas been run (new public module method changes the generated actor signature).'wc-active', thendontSeeOrderInDatabase(['status' => 'cancelled'])passes (does NOT match the row) — proving normalization is inherited viamapCriteria().dontSeeOrderInDatabase(['id' => 999999])passes against an empty/non-matching table.OrderCestand/orOrderHPOSCest).Blocked by