Changeset 3409431
- Timestamp:
- 12/03/2025 11:55:55 AM (4 months ago)
- Location:
- block-specific-spam-woo-orders
- Files:
-
- 3 added
- 2 edited
-
tags/0.79 (added)
-
tags/0.79/readme.txt (added)
-
tags/0.79/woo-block-spam-orders.php (added)
-
trunk/readme.txt (modified) (2 diffs)
-
trunk/woo-block-spam-orders.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
block-specific-spam-woo-orders/trunk/readme.txt
r3270706 r3409431 3 3 Tags: woocommerce, woo, block, spam, orders 4 4 Requires at least: 5.1 5 Tested up to: 6. 85 Tested up to: 6.9 6 6 Requires PHP: 5.4 7 Stable tag: 0.7 87 Stable tag: 0.79 8 8 License: GPLv2 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 86 86 == Changelog == 87 87 88 = 0.79 = 89 * Tested compatibility with WordPress 6.9 90 * Minor change to enforce case insenstiive comparison of names. 91 88 92 = 0.78 = 89 93 * Tested compatibility with WooCommerce 9.8.1 -
block-specific-spam-woo-orders/trunk/woo-block-spam-orders.php
r3270706 r3409431 3 3 /* 4 4 * Plugin Name: Block Specific Spam Woo Orders 5 * Plugin URI: 5 * Plugin URI: https://wordpress.org/plugins/block-specific-spam-woo-orders/ 6 6 * Description: A quick plugin to block on-going issues with spam WooCommerce orders November 2020 7 7 * Author: guwii 8 * Version: 0.7 88 * Version: 0.79 9 9 * Author URI: https://guwii.com 10 10 * License: GPL3+ 11 11 * Text Domain: guwii-woo-block-spam-orders 12 12 * WC requires at least: 4.3 13 * WC tested up to: 9.8.113 * WC tested up to: 10.3 14 14 */ 15 15 if (! defined('ABSPATH')) { 16 exit; // Exit if accessed directly 17 } 16 18 // Only use this plugin if WooCommerce is active 17 if (in_array('woocommerce/woocommerce.php', get_option('active_plugins'))) { 19 if ( 20 in_array('woocommerce/woocommerce.php', (array) get_option('active_plugins', []), true) 21 || in_array('woocommerce/woocommerce.php', (array) get_site_option('active_sitewide_plugins', []), true) 22 ) { 18 23 19 24 // Add our custom checks to the built-in WooCommerce checkout validation: … … 59 64 // If not spam by email domain, check the names 60 65 if (!$is_a_spam_order) { 66 $billing_first_name_lower = strtolower($billing_first_name); 67 61 68 foreach ($blocked_names as $blocked_name) { 62 if (strpos($billing_first_name , $blocked_name) !== false) {69 if (strpos($billing_first_name_lower, strtolower($blocked_name)) !== false) { 63 70 $is_a_spam_order = true; 64 71 break;
Note: See TracChangeset
for help on using the changeset viewer.