Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
5b78a8d
Udp.Code.WooCommerce integration
datorik Aug 13, 2026
bccf9f8
Udp.Code.Security WooCommerce UI
datorik Aug 14, 2026
871476a
Udp.Code.Security WooCommerce UI
datorik Aug 18, 2026
d793212
Udp.Code.Security WooCommerce UI
datorik Aug 20, 2026
5304c09
Udp.Code.Security WooCommerce UI
datorik Aug 20, 2026
bc37ac3
Udp.Code.Security WooCommerce UI
datorik Aug 21, 2026
f311aa3
Udp.Code.Security WooCommerce UI
datorik Aug 21, 2026
f905764
Merge branch 'dev' into woo-commerce-update.ab-2
datorik Aug 24, 2026
f55e34f
Code review
alexander-b-clean Aug 24, 2026
06c8bed
Code review
alexander-b-clean Aug 24, 2026
1400e41
Fix errors psalm
AntonV1211 Aug 24, 2026
9601aa2
Merge remote-tracking branch 'origin/woo-commerce-update.ab-2' into w…
datorik Aug 24, 2026
8b6b2d0
Udp.Code.Security WooCommerce UI. Task 1
datorik Sep 8, 2026
1303148
Udp.Code.Security WooCommerce UI. Task 2
datorik Sep 9, 2026
2abe12c
Udp.Code.Security WooCommerce UI. Task 3
datorik Sep 9, 2026
b0047ae
Merge branch 'dev' into woo-commerce-update.ab-2
alexandergull Sep 22, 2026
dde7ba8
Upd. WooCommerce. New option to manage if rejection message have to b…
alexandergull Sep 22, 2026
b59f535
Code. Tests.
alexandergull Sep 22, 2026
558f3d5
Fix. WooCommerce. Match the actual thank-you template name for the bl…
alexandergull Sep 22, 2026
0f15ecf
Fix. WooCommerce. Restore a legacy admin page fallback for stored spa…
alexandergull Sep 22, 2026
b40a3f4
Fix. WooCommerce. Rename the spam orders 'Total' column to 'Items tot…
alexandergull Sep 22, 2026
b651bd5
Fix. WooCommerce. Prevent a fatal error in replaceOrdersListRenderer(…
alexandergull Sep 22, 2026
e2e5698
Code. Fixed test falling.
alexandergull Sep 22, 2026
d406afd
Fix. WooCommerce. Build the Store API checkout response before deleti…
alexandergull Sep 22, 2026
94cb1b5
Fix. WooCommerce. Point the settings 'spam orders' link to the correc…
alexandergull Sep 22, 2026
c38aae0
Fix. WooCommerce. Align spam orders capability checks on manage_options.
alexandergull Sep 22, 2026
053d354
Fix. WooCommerce. Don't pass HPOS view links into the legacy spam ord…
alexandergull Sep 22, 2026
89a22cc
Fix. WooCommerce. Route the admin bar 'spam orders' link by HPOS/lega…
alexandergull Sep 23, 2026
37c3240
Fix. WooCommerce. Render the blocked order overview on the block base…
alexandergull Sep 23, 2026
735d3a0
Fix. WooCommerce. Use dedicated request parameters for the spam order…
alexandergull Sep 25, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion css/cleantalk-admin.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

45 changes: 45 additions & 0 deletions css/src/cleantalk-admin.css
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,51 @@
.apbct-details-spam-order-button {
color: gray;
}

/* WooCommerce orders list alike view of the spam orders table.
The order column has no width, so it takes all the space left. */
.wp-list-table.wc_spam_orders .column-ct_order_date,
.wp-list-table.wc_spam_orders .column-ct_status,
.wp-list-table.wc_spam_orders .column-ct_total {
width: 15%;
}

.wp-list-table.wc_spam_orders td {
vertical-align: middle;
}

.wp-list-table.wc_spam_orders .apbct-order-view {
color: #2271b1;
text-decoration: none;
}

.wp-list-table.wc_spam_orders .apbct-order-view:hover {
color: #135e96;
}

.apbct-order-status {
display: inline-flex;
line-height: 2.5em;
color: #454545;
background: #e5e5e5;
border-radius: 4px;
border-bottom: 1px solid rgba(0, 0, 0, .05);
margin: -.25em 0;
cursor: inherit !important;
white-space: nowrap;
max-width: 100%;
}

.apbct-order-status > span {
margin: 0 1em;
overflow: hidden;
text-overflow: ellipsis;
}

.apbct-order-status--spam {
background: #eba3a3;
color: #570000;
}
.ct-modal-buttons {
display: flex;
align-items: center;
Expand Down
8 changes: 7 additions & 1 deletion inc/cleantalk-admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -1194,11 +1194,17 @@ function apbct_admin__admin_bar__add_child_nodes($wp_admin_bar)

// Add a child item to our parent item. Bulk checks.
if ( ! is_network_admin() && apbct_is_plugin_active('woocommerce/woocommerce.php') ) {
// HPOS installations render the spam orders view inline on the wc-orders screen;
// legacy (posts table) installations get a separate fallback admin page instead.
$spam_orders_page = function_exists('wc_get_page_screen_id') && wc_get_page_screen_id('shop_order') !== 'shop_order'
? 'wc-orders&status=wc-spamorder'
: 'apbct_wc_spam_orders';

$wp_admin_bar->add_node(
array(
'parent' => 'apbct__parent_node',
'id' => 'ct_settings_bulk_orders',
'title' => '<a href="admin.php?page=apbct_wc_spam_orders" title="Bulk spam orders removal tool.">'
'title' => '<a href="admin.php?page=' . $spam_orders_page . '" title="Bulk spam orders removal tool.">'
. __('WooCommerce spam orders', 'cleantalk-spam-protect') . '</a>',
)
);
Expand Down
19 changes: 17 additions & 2 deletions inc/cleantalk-settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,16 @@ function apbct_settings__set_fields()
),
'data__wc_store_blocked_orders' => array(
'title' => __('Store blocked orders', 'cleantalk-spam-protect'),
'description' => __('The orders which was blocked by the Anti-Spam will be stored and could be restored manually later if its needed.', 'cleantalk-spam-protect'),
'description' => __('Orders blocked by Anti-Spam will be stored and can be restored manually later if needed.', 'cleantalk-spam-protect'),
'class' => 'apbct_settings-field_wrapper--sub',
'options' => array(
array('val' => 1, 'label' => __('On')),
array('val' => 0, 'label' => __('Off')),
),
),
'forms__wc_show_rejection_message' => array(
'title' => __('Show rejection message to customers', 'cleantalk-spam-protect'),
'description' => __('This message tells the customer why their order was filtered, allowing them to fix the issue that caused it. However, this may result in multiple orders from the same customer because all rejected orders are saved in the Spam folder. By default, this option is OFF.', 'cleantalk-spam-protect'),
'class' => 'apbct_settings-field_wrapper--sub',
'options' => array(
array('val' => 1, 'label' => __('On')),
Expand Down Expand Up @@ -2187,8 +2196,14 @@ function apbct_settings__field__action_buttons()

if ( apbct_is_plugin_active('woocommerce/woocommerce.php') ) {
add_filter('apbct_settings_action_buttons', function ($buttons_array) {
// HPOS installations render the spam orders view inline on the wc-orders screen;
// legacy (posts table) installations get a separate fallback admin page instead.
$spam_orders_page = function_exists('wc_get_page_screen_id') && wc_get_page_screen_id('shop_order') !== 'shop_order'
? 'wc-orders&amp;status=wc-spamorder'
: 'apbct_wc_spam_orders';
Comment thread
alexandergull marked this conversation as resolved.

$buttons_array[] =
'<a href="admin.php?page=apbct_wc_spam_orders" class="ct_support_link" title="Bulk spam orders removal tool.">'
'<a href="admin.php?page=' . $spam_orders_page . '" class="ct_support_link" title="Bulk spam orders removal tool.">'
. __('WooCommerce spam orders', 'cleantalk-spam-protect')
. '</a>';
return $buttons_array;
Expand Down
16 changes: 16 additions & 0 deletions inc/cleantalk-updater.php
Original file line number Diff line number Diff line change
Expand Up @@ -1388,3 +1388,19 @@ function apbct_update_to_6_76_0()
$apbct->saveData();
}
}

/**
* Preserve the legacy WooCommerce checkout behavior (rejection message shown to the customer)
* for users who already had "Store blocked orders" enabled before the new option was introduced.
*
* @return void
*/
function apbct_update_to_6_89_0()
{
global $apbct;

if ( ! empty($apbct->settings['data__wc_store_blocked_orders']) ) {
$apbct->settings['forms__wc_show_rejection_message'] = 1;
$apbct->saveSettings();
}
}
Loading
Loading