How to Block Specific Order Amounts in WooCommerce

If your WooCommerce store keeps getting fraudulent orders for the same odd amounts, you’re likely dealing with card testing bots. The fastest fix is a plugin that blocks orders by exact total. OOPSpam Anti-Spam is a strong option to start with since it combines specific-amount blocking with broader fraud detection in one free plugin.

Why This Happens

Card testing attacks use stolen credit card numbers to place small, repeated orders to see which cards still work. Warning signs include a flood of failed orders, the same total amount appearing again and again, fake customer details, and heavy use of PayPal or credit cards. Blocking specific totals stops this pattern before it reaches your payment processor.

Here’s a real example from a WooCommerce order list, where dozens of failed orders all share the exact same $999.00 total within hours of each other, a clear sign of a bot repeatedly testing the same card details:

Dozens of failed orders all share the exact same total

Option 1: OOPSpam Anti-Spam

OOPSpam (that’s us) is a WordPress plugin built for spam and fraud prevention, including WooCommerce checkouts. Rather than relying on CAPTCHA, it works quietly in the background, checking orders against a database of 500 million+ known malicious IPs and emails, plus machine learning analysis. It has reportedly caught over 1 billion spam submissions to date, and store owners report card testing attacks stopping entirely after activation.

Its “Block orders with specific total amounts” setting lets you list exact dollar figures, one per line, to reject automatically at checkout.

Keep in mind that blocking by amount is a reactive, quick fix. If the same fraudster simply changes the order total, that specific rule stops catching them. This is where OOPSpam’s other checks matter: alongside amount blocking, it also screens each order’s IP address and email against its database of known bad actors, so an attacker can still get flagged even after switching up the total.

Steps:

Install and activate the OOPSpam Anti-Spam plugin.

OOPSpam Anti-Spam

Sign up for a OOPSpam API key.

Sign up for a OOPSpam API key

Go to Settings > OOPSpam Anti-Spam > General, paste the key, and save.

Paste the API key and save

In the OOPSpam settings, find the WooCommerce section and turn on Activate Spam Protection.

Find the WooCommerce section and turn on Activate Spam Protection

Under Block orders with specific total amounts, enter the totals to block, one per line (for example: 5.95, 19.99, 29.95).

Block orders with specific total amounts

Optionally customize the rejection message shown to customers. Click Save changes.

For added protection, also consider enabling Block orders from unknown origin and Rate limiting in the same settings panel.

Option 2: Order Minimum/Maximum Amount Limits for WooCommerce

If you want to enforce order total ranges rather than exact figures, this WPFactory plugin is a flexible pick. It lets you set limits by sum, quantity, weight, or volume, and apply them globally, per product, per category, or per user role.

Order Minimum/Maximum Amount for WooCommerce

  1. Install and activate Order Minimum/Maximum Amount for WooCommerce from your WordPress dashboard.
  2. Go to WooCommerce > Settings > Order Min/Max Amount.
  3. Check Enable plugin, then set your Amount limits (Minimum, Maximum, or both) and choose an Amount type such as Sum for order totals.
  4. Enable Block checkout process so orders that don’t meet the limits can’t go through.
  5. Go to the Messages tab to customize the notice shown to customers on the cart, mini-cart, and checkout pages.

A new Order Min/Max Amount box appears there, where you can also set different limits per user role

  1. For product-specific rules, go to the Products tab, enable Per product and/or Per product category, then set the limits directly on each product or category edit page (a new Order Min/Max Amount box appears there, where you can also set different limits per user role).

  2. Save your settings.

Keep in mind this plugin blocks ranges, not exact totals. It will not stop an order at exactly $19.99 unless that figure falls outside your min/max range.

Option 3: Custom Code Snippet

Developers can add a PHP snippet to their child theme’s functions.php file or a plugin like WPCode:

add_action( 'woocommerce_checkout_process', 'wc_minimum_order_amount' );
add_action( 'woocommerce_before_cart', 'wc_minimum_order_amount' );

function wc_minimum_order_amount() {
    $minimum_amount = 50.00;

    if ( WC()->cart->subtotal < $minimum_amount ) {
        wc_add_notice(
            sprintf( 'A minimum order total of %s is required to checkout.', wc_price( $minimum_amount ) ),
            'error'
        );
    }
}

This only enforces a minimum total. Blocking exact figures requires custom array logic, and you lose the fraud intelligence, logging, and rate limiting a dedicated plugin provides.

Which Option Should You Choose?

For most stores facing the classic “same odd total, over and over” pattern, OOPSpam offers a fairly complete solution with minimal setup effort.

Spam Protection for WordPress, Zapier, Make and more.

Since our launch in 2017 we’ve been perfecting our API to be the trusted option for small businesses to enterprise— and continue to stick to our values of being the accessibility and privacy-friendly option. Give us a shot!

Try OOPSpam for free → Try our WordPress plugin for free →

✓ No credit card required ✓ Cancel anytime

Enjoy Reading This Article?

Here are some more articles you might like to read next: