Closed sapayth closed 3 months ago
The recent updates to wpuf-functions.php
focus on enhancing the validation processes for the orderby
and order
parameters in the wpuf_get_completed_transactions
and wpuf_get_pending_transactions
functions. Additionally, support has been added for valid local variables $orderby
and $order
. The return types for wpuf_get_all_transactions
were also expanded to include int
and void
for better handling of different result types.
File | Change Summary |
---|---|
wpuf-functions.php |
Updated wpuf_get_completed_transactions and wpuf_get_pending_transactions to validate orderby and order parameters, added new local variables and modified return types. |
sequenceDiagram
participant User
participant wpuf_get_completed_transactions
participant wpuf_get_pending_transactions
participant wpuf_get_all_transactions
User->>wpuf_get_completed_transactions: Call with args
wpuf_get_completed_transactions->>wpuf_get_completed_transactions: Validate `orderby` and `order`
wpuf_get_completed_transactions-->>User: Return array|string
User->>wpuf_get_pending_transactions: Call with args
wpuf_get_pending_transactions->>wpuf_get_pending_transactions: Validate `orderby` and `order`
wpuf_get_pending_transactions-->>User: Return array|int|void
User->>wpuf_get_all_transactions: Call with args
wpuf_get_all_transactions-->>User: Return array|int|void
In code we trust, transactions flow, With order and sort, a cleaner show, Pending or done, they march in line, Improvements made, just in time. Indeed, it's true, our code's refined, With valid checks, it won't unwind.
[!TIP]
Early access features: enabled
We are currently testing the following features in early access: - **OpenAI `gpt-4o` model for code reviews and chat**: OpenAI claims that this model is better at understanding and generating code than the previous models. We seek your feedback over the next few weeks before making it generally available. Note: - You can enable or disable early access features from the CodeRabbit UI or by updating the CodeRabbit configuration file. - Please join our [Discord Community](https://discord.com/invite/GsXnASn26c) to provide feedback and report issues. - OSS projects are currently opted into early access features by default.
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
validate orderby and order input params for sorting a WP list table. details here.
for testers: please check the Transactions are showing, sorting properly in WP dashboard > WPUF > Transections menu
Summary by CodeRabbit
Bug Fixes
orderby
andorder
parameters in transaction functions to prevent invalid values.Enhancements