Plugin Directory

Changeset 3409431


Ignore:
Timestamp:
12/03/2025 11:55:55 AM (4 months ago)
Author:
Wigster
Message:

0.79 - minor tweaks

Location:
block-specific-spam-woo-orders
Files:
3 added
2 edited

Legend:

Unmodified
Added
Removed
  • block-specific-spam-woo-orders/trunk/readme.txt

    r3270706 r3409431  
    33Tags: woocommerce, woo, block, spam, orders
    44Requires at least: 5.1
    5 Tested up to: 6.8
     5Tested up to: 6.9
    66Requires PHP: 5.4
    7 Stable tag: 0.78
     7Stable tag: 0.79
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    8686== Changelog ==
    8787
     88= 0.79 =
     89* Tested compatibility with WordPress 6.9
     90* Minor change to enforce case insenstiive comparison of names.
     91
    8892= 0.78 =
    8993* Tested compatibility with WooCommerce 9.8.1
  • block-specific-spam-woo-orders/trunk/woo-block-spam-orders.php

    r3270706 r3409431  
    33/*
    44* Plugin Name: Block Specific Spam Woo Orders
    5 * Plugin URI:
     5* Plugin URI: https://wordpress.org/plugins/block-specific-spam-woo-orders/
    66* Description: A quick plugin to block on-going issues with spam WooCommerce orders November 2020
    77* Author: guwii
    8 * Version: 0.78
     8* Version: 0.79
    99* Author URI: https://guwii.com
    1010* License: GPL3+
    1111* Text Domain: guwii-woo-block-spam-orders
    1212* WC requires at least: 4.3
    13 * WC tested up to: 9.8.1
     13* WC tested up to: 10.3
    1414*/
    15 
     15if (! defined('ABSPATH')) {
     16  exit; // Exit if accessed directly
     17}
    1618// Only use this plugin if WooCommerce is active
    17 if (in_array('woocommerce/woocommerce.php', get_option('active_plugins'))) {
     19if (
     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) {
    1823
    1924  // Add our custom checks to the built-in WooCommerce checkout validation:
     
    5964    // If not spam by email domain, check the names
    6065    if (!$is_a_spam_order) {
     66      $billing_first_name_lower = strtolower($billing_first_name);
     67
    6168      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) {
    6370          $is_a_spam_order = true;
    6471          break;
Note: See TracChangeset for help on using the changeset viewer.