Udp.Code.WooCommerce UI - #867
Conversation
There was a problem hiding this comment.
Pull request overview
Updates the WooCommerce spam-orders experience by integrating the plugin’s “blocked orders” table into the native WooCommerce Orders admin screen (HPOS), aligning columns/styles with WooCommerce UI, and adjusting checkout handling to support storing/redirecting blocked checkouts.
Changes:
- Reworks the spam orders list table UI (new columns, totals, status views integration, pagination/sorting tweaks).
- Hooks into the WooCommerce HPOS orders screen to add “Spam”/“On hold” status links and to replace the renderer when viewing Spam.
- Adds a helper for counting stored spam orders and updates admin/settings links to point at the WooCommerce orders screen spam view.
Reviewed changes
Copilot reviewed 7 out of 8 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| lib/Cleantalk/ApbctWP/WcSpamOrdersListTable.php | Refactors table UI/columns, adds views/status/total calculation, updates delete URL building, and introduces page notices rendering. |
| lib/Cleantalk/ApbctWP/WcSpamOrdersFunctions.php | Adds a DB-count helper for stored blocked orders. |
| lib/Cleantalk/ApbctWP/State.php | Changes the default for storing blocked orders. |
| lib/Cleantalk/Antispam/IntegrationsByClass/Woocommerce.php | Integrates spam orders into HPOS orders screen; adjusts blocked-checkout behavior and adds view/link logic. |
| inc/cleantalk-settings.php | Updates settings-page action link target to the WooCommerce orders spam status view. |
| inc/cleantalk-admin.php | Updates admin bar link target to the WooCommerce orders spam status view. |
| css/src/cleantalk-admin.css | Adds styling to make the spam orders table match WooCommerce orders list UI. |
| css/cleantalk-admin.min.css | Minified CSS update reflecting the new admin styling. |
Files not reviewed (1)
- css/cleantalk-admin.min.css: Generated file
Suppressed comments (1)
lib/Cleantalk/Antispam/IntegrationsByClass/Woocommerce.php:239
- Same issue as the AJAX checkout path: returning early here skips the spam check for Store API checkouts when
data__wc_store_blocked_ordersis off, even though the setting is documented as “store blocked orders” (not “disable protection”).
if ( ! $apbct->settings['data__wc_store_blocked_orders'] ) {
// The checkout is left to WooCommerce as is: no check, no blocked order to store.
return;
}
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
…oo-commerce-update.ab-2
Codecov Report❌ Patch coverage is ❌ Your patch check has failed because the patch coverage (0.00%) is below the target coverage (70.00%). You can increase the patch coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## dev #867 +/- ##
============================================
- Coverage 29.20% 28.98% -0.22%
- Complexity 6443 6531 +88
============================================
Files 287 287
Lines 26064 26249 +185
============================================
- Hits 7611 7608 -3
- Misses 18453 18641 +188 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
https://app.doboard.com/1/task/54749