How to block countries in SureCart?

SureCart

Spam orders and fraudulent submissions from certain regions can impact revenue, disrupt operations, and create unnecessary admin work. Fortunately, if you’re using SureCart, you have several ways to block or restrict orders and form submissions based on the user’s country.

This guide explains:

1. Blocking Countries Using SureCart’s Built-In Features

SureCart can restrict countries using either the Shipping Zones settings or Conditional Blocks on checkout forms.

Here are your options:

Restricting Purchases via Shipping Zones 

You can stop customers from completing a purchase if their country isn’t included in your shipping setup.

To do this:

Head to SureCart > Settings > Shipping. Choose an existing shipping zone or create a new one. Then, set the countries that are eligible for shipping in that zone. Any customer from a country outside these zones won’t be able to proceed with checkout.

SureCart Restricting Purchases via Shipping Zones

This is ideal for blocking orders from unsupported or high-risk countries.

Using Conditional Blocks in Checkout Forms 

You can use conditional logic to show or hide parts of your checkout form depending on the customer’s location.

Open SureCart > Checkout Forms, then select the form you want to edit. Add a Conditional block to the form. In the configuration panel, set the condition to look at the Shipping Country. Choose the countries you want to include or exclude.

SureCart Using Conditional Blocks in Checkout Forms

You can now display a custom message, hide payment options, or even block checkout entirely based on the customer’s location. This is useful if you only want to restrict access to specific payment gateways or discounts for certain regions.

2. Advanced Country Blocking in SureCart Using OOPSpam

OOPSpam Anti-Spam plugin

If you’re facing bot attacks, spam orders, or automated abuse from specific regions, the OOPSpam Anti-Spam plugin is a robust option.

OOPSpam (that’s us 👋) integrates with SureCart to help filter out unwanted form submissions and purchases before they reach your inbox or payment processor.

What OOPSpam Adds to SureCart

How to Set It Up

Install the OOPSpam Anti-Spam plugin from your WordPress dashboard. Once active, go to OOPSpam Anti-Spam > Settings.

OOPSpam API key

Paste your API key from your OOPSpam account to activate protection. 

OOPSpam account dashboard

Then, scroll to the Country Filtering section and choose the countries you want to block or allow.

Country Filtering section

Next, Activate Spam Protection by switching the toggle to the “on” position.

SureCart Activate Spam Protection

Once saved, OOPSpam will filter submissions in the background, blocking unwanted entries while keeping the rest of your website accessible.

Monitoring and Logs

Unlike SureCart’s built-in shipping or form controls, OOPSpam offers detailed logs for each blocked or accepted submission. Each entry includes:

In your WordPress admin panel, you’ll find sections for Form Spam Entries (blocked) and Form Ham Entries (clean).

Over in your OOPSpam dashboard, you’ll see detailed logs that include submission content, IP address, spam score, timestamp, and other useful data.

Here’s an example of what the log view looks like in your OOPSpam account:

Monitoring and Logs

You can analyze these logs to identify trends or fine-tune your settings further.

3. Blocking Countries Entirely Using Cloudflare

If your goal is to prevent access to your entire website from specific countries not just SureCart checkouts—Cloudflare can help.

Cloudflare

Cloudflare’s Web Application Firewall (WAF) lets you block website visitors based on their country.

Here’s how: Log into your Cloudflare dashboard and select your website. Go to the Security section and open the WAF tab. Click on Firewall Rules.

Create a new rule. Give it a name (like “Block Countries”). Set the field to Country, operator to is in, and then choose the countries to block. Set the action to Block, save the rule, and deploy.

Cloudflare WAF

This blocks all requests from those countries, including visits to your homepage, blog, and product pages.

When to Use Each Method

Method What It Blocks Best For
SureCart Shipping Zones & Conditional Blocks Checkout form elements or orders Regional sales restrictions or legal compliance
OOPSpam Anti-Spam Form submissions & orders Spam filtering, language or IP blocking
Cloudflare WAF Entire website access DDoS protection or full country bans

Final thoughts

SureCart gives you flexible tools to restrict purchases based on country, but it doesn’t filter out spam or bot activity. For a deeper layer of protection, OOPSpam integrates directly with SureCart and can block spammy or suspicious entries based on location, rate limiting, IP filtering, language, and more.

If you’re dealing with targeted abuse or bot attacks, consider adding OOPSpam and optionally Cloudflare rules for broader security.

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: