Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion inc/cleantalk-admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -1198,7 +1198,7 @@ function apbct_admin__admin_bar__add_child_nodes($wp_admin_bar)
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=wc-orders&amp;status=wc-spamorder" title="Bulk spam orders removal tool.">'
. __('WooCommerce spam orders', 'cleantalk-spam-protect') . '</a>',
)
);
Expand Down
1 change: 0 additions & 1 deletion inc/cleantalk-ajax.php
Original file line number Diff line number Diff line change
Expand Up @@ -894,7 +894,6 @@ function ct_ajax_hook($message_obj = null)
'message' => $ct_result->comment
)
);
die();
}

// Plugin Name: eForm - WordPress Form Builder; ajax action ipt_fsqm_save_form
Expand Down
3 changes: 0 additions & 3 deletions inc/cleantalk-public-integrations.php
Original file line number Diff line number Diff line change
Expand Up @@ -2448,9 +2448,6 @@ function apbct_form__the7_contact_form()
);

wp_send_json($response);

// IMPORTANT: don't forget to "exit" @todo AG: Why? Exit does not terminate connection, but I can't see how it is applicable
exit;
}
}
}
Expand Down
19 changes: 17 additions & 2 deletions inc/cleantalk-settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -364,9 +364,24 @@ function apbct_settings__set_fields()
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')),
array('val' => 0, 'label' => __('Off')),
),
),
'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. If the option is OFF, the customer must fix the issue on their end to pass the anti-spam check and place an order. By default, this option is ON.',
'cleantalk-spam-protect'
),
'class' => 'apbct_settings-field_wrapper--sub',
'options' => array(
array('val' => 1, 'label' => __('On')),
Expand Down Expand Up @@ -2179,7 +2194,7 @@ function apbct_settings__field__action_buttons()
if ( apbct_is_plugin_active('woocommerce/woocommerce.php') ) {
add_filter('apbct_settings_action_buttons', function ($buttons_array) {
$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=wc-orders&amp;status=wc-spamorder" class="ct_support_link" title="Bulk spam orders removal tool.">'
. __('WooCommerce spam orders', 'cleantalk-spam-protect')
. '</a>';
return $buttons_array;
Expand Down
8 changes: 8 additions & 0 deletions inc/cleantalk-updater.php
Original file line number Diff line number Diff line change
Expand Up @@ -1378,6 +1378,14 @@ function apbct_update_to_6_60_0()
}
}

function apbct_update_to_6_88_0()
{
global $apbct;

$apbct->settings['forms__wc_show_rejection_message'] = 1;
$apbct->save('settings');
Comment on lines +1385 to +1386

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I disagree.

}

function apbct_update_to_6_76_0()
{
global $apbct;
Expand Down
1 change: 0 additions & 1 deletion lib/Cleantalk/Antispam/Integrations/ChatyContactForm.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,5 @@ public function doBlock($message)
'message' => $message,
];
wp_send_json($response);
exit;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ public function doBlock($message)
)
)
);
return false;
}

public function allow()
Expand Down
1 change: 0 additions & 1 deletion lib/Cleantalk/Antispam/Integrations/HivePress.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,5 @@ public function doBlock($message)
'error' => ['message' => $message],
]
);
die();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,5 @@ public function doBlock($message)
'error' => ['message' => $message],
]
);
die();
}
}
1 change: 0 additions & 1 deletion lib/Cleantalk/Antispam/Integrations/MailPoet.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,5 @@ public function doBlock($message)
),
403
);
die();
}
}
1 change: 0 additions & 1 deletion lib/Cleantalk/Antispam/Integrations/SureForms.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,5 @@ public function doBlock($message)
'message' => $message
)
);
die();
}
}
3 changes: 0 additions & 3 deletions lib/Cleantalk/Antispam/Integrations/UserRegistrationPro.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,6 @@ public function getDataForChecking($argument)

/**
* @param $message
*
* @psalm-suppress UnusedVariable
*/
public function doBlock($message)
{
Expand All @@ -48,6 +46,5 @@ public function doBlock($message)
'message' => $message
)
);
die();
}
}
Loading