Testing Guide for Ship Restrict

Complete guide to testing your shipping restrictions - test properly before going live and avoid customer issues

Last updated: 8/30/2025

Testing Guide for Ship Restrict

Proper testing ensures your shipping restrictions work correctly before customers encounter them. This guide shows you how to test thoroughly and catch issues early.

Why Testing Matters

What happens without proper testing:

  • Customers unable to complete purchases
  • Products shipping to restricted locations (compliance issues)
  • Lost sales from incorrect restrictions
  • Customer service headaches
  • Potential legal problems

What proper testing prevents:

  • Compliance violations
  • Cart abandonment
  • Customer frustration
  • Revenue loss
  • Support tickets

Setting Up Your Test Environment

Creating Test Conditions

Test Customer Accounts

Create these test accounts:

  1. Restricted State Customer

    • Name: Test Restricted
    • Address: 123 Main St, Los Angeles, CA 90001
    • Use for: Testing California restrictions
  2. Allowed State Customer

    • Name: Test Allowed
    • Address: 456 Oak Ave, Austin, TX 78701
    • Use for: Testing allowed locations
  3. Edge Case Customer

    • Name: Test Edge
    • Address: 789 Border St, Springfield, IL 62701
    • Use for: Testing city-specific rules

Test Products

Set up these test products:

  1. Unrestricted Test Product

    • Price: $1.00
    • No restrictions
    • Use for: Baseline testing
  2. State Restricted Product

    • Price: $1.00
    • Restricted from CA, NY
    • Use for: State restriction testing
  3. Complex Restriction Product

    • Price: $1.00
    • Multiple restrictions
    • Use for: Advanced testing

Using Staging Sites

Best practice: Test on staging first

Setting up staging

Option 1: Subdomain staging

Live site: yourstore.com Staging: staging.yourstore.com

Option 2: Local development

  • Use Local by Flywheel
  • Or XAMPP/MAMP
  • Copy your live site

Option 3: Host-provided staging

  • Many hosts offer one-click staging
  • WP Engine, SiteGround, etc.

Staging setup checklist

  • Copy of live site
  • Same WooCommerce version
  • Same theme
  • Same plugins
  • Test payment gateway
  • Disable emails to customers

Testing Basic Restrictions

Step-by-Step Testing Process

Test 1: State Restrictions

Setup:

  1. Create rule blocking California
  2. Add product to this rule

Test steps:

  1. Add product to cart
  2. Go to checkout
  3. Enter California address
  4. Verify restriction message appears
  5. Verify product removed from cart

Expected result:

  • Clear error message
  • Product removed
  • Other products remain

Also test:

  • Different California cities
  • California ZIP codes
  • Abbreviation (CA) vs full name

Test 2: City Restrictions

Setup:

  1. Create rule blocking Chicago, IL
  2. Don't block rest of Illinois

Test steps:

  1. Test Chicago address → Should block
  2. Test Springfield, IL → Should allow
  3. Test variations: "chicago" vs "CHICAGO"

Common issues to check:

  • City spelling variations
  • Case sensitivity
  • State-city pair format

Test 3: ZIP Code Restrictions

Setup:

  1. Add specific ZIP codes: 90210, 10001
  2. Test exact matches

Test addresses:

  • 90210 → Blocked
  • 90210-1234 → Check if blocked
  • 90211 → Should allow

Important: Decide if you want ZIP+4 support

Testing Rule Logic

"Block From" Logic Test

Setup: Block from CA, NY

Test matrix:

LocationExpected Result
California❌ Blocked
New York❌ Blocked
Texas✅ Allowed
Florida✅ Allowed

"Allow Only" Logic Test

Setup: Allow only TX, FL

Test matrix:

LocationExpected Result
Texas✅ Allowed
Florida✅ Allowed
California❌ Blocked
New York❌ Blocked

Testing Complex Scenarios

Multiple Rules on Same Product

Scenario: Product with multiple restrictions

Setup:

  • Category rule: Block CA
  • Tag rule: Block NY
  • Product rule: Also block TX

Test each location:

  1. California → Blocked by category
  2. New York → Blocked by tag
  3. Texas → Blocked by product
  4. Florida → Should work

Variation Testing

For variable products:

Setup example:

  • T-Shirt product
  • Small: No restrictions
  • Medium: Block CA
  • Large: Block CA, NY

Test process:

  1. Add Small to cart → Ships everywhere
  2. Add Medium to cart → Blocked in CA only
  3. Add Large to cart → Blocked in CA and NY
  4. Mix variations → Each follows own rules

Category vs Product Rules

Testing inheritance:

Setup:

  • Category "Alcohol": Block UT, PA
  • Product in category: Override to allow PA

Tests:

  1. Utah address → Blocked (category rule)
  2. Pennsylvania → Allowed (product override)
  3. Other states → Allowed

Testing Customer Experience

Cart Behavior Testing

Test these scenarios:

Scenario 1: Mixed Cart

Cart contents:

  • Restricted product
  • Unrestricted product

Test:

  1. Enter restricted address
  2. Restricted product removed
  3. Unrestricted product remains
  4. Can complete purchase

Scenario 2: All Products Restricted

Cart contents:

  • All products restricted to location

Test:

  1. Enter restricted address
  2. All products removed
  3. Clear message explaining why
  4. Cart is empty

Message Testing

Check message quality:

Good message example:

"Wine cannot be shipped to Utah due to state regulations. Please remove this item to continue."

Test for:

  • Message appears prominently
  • Explains the restriction
  • Tells customer what to do
  • Product name included with {product}

Checkout Flow Testing

Complete checkout test:

  1. Browse → Add products
  2. Cart → View restrictions
  3. Checkout → Enter address
  4. Validation → See messages
  5. Resolution → Remove items
  6. Complete → Finish order

Test on:

  • Desktop
  • Mobile
  • Tablet
  • Different browsers

Pre-Launch Checklist

Final Testing Steps

Week Before Launch

  • Test all restriction rules
  • Verify all product assignments
  • Check all messages
  • Test with real addresses
  • Mobile device testing
  • Different browser testing

Day Before Launch

  • Final test of critical products
  • Verify Pro license (if applicable)
  • Clear all test orders
  • Remove test products
  • Backup everything

Launch Day

  • Enable restrictions
  • Test with one real product
  • Monitor first orders
  • Watch for support tickets
  • Be ready to rollback

Common Testing Mistakes

Mistake 1: Only Testing as Admin

Problem: Admin view may differ Solution: Always test as customer or incognito

Mistake 2: Not Testing Mobile

Problem: 50%+ of traffic is mobile Solution: Test on real devices

Mistake 3: Forgetting Edge Cases

Problem: Unusual addresses fail Solution: Test military (APO), territories, etc.

Mistake 4: Not Testing After Updates

Problem: Updates can break things Solution: Re-test after any changes

Testing Tools and Shortcuts

Browser Testing

Quick testing method:

  1. Incognito/Private mode (Ctrl+Shift+N)

    • Fresh session
    • No cached data
    • Like new customer
  2. Browser DevTools (F12)

    • Test different viewports
    • Check for JavaScript errors
    • Monitor network requests

Quick Address List

Copy/paste these for testing:

California (Restricted):

John Test 123 Main Street Los Angeles, CA 90001

New York (Restricted):

Jane Test 456 Broadway New York, NY 10001

Texas (Allowed):

Bob Test 789 Congress Ave Austin, TX 78701

Illinois (City testing):

Sam Test 321 State St Chicago, IL 60601

Testing Different Scenarios

Speed Testing Process

5-minute quick test:

  1. One restricted product → restricted address
  2. One allowed product → same address
  3. Same product → allowed address
  4. Check messages appear
  5. Verify cart updates

15-minute thorough test:

  • All rule types
  • Multiple products
  • Various addresses
  • Mobile and desktop
  • Different payment methods

Troubleshooting Test Failures

When Tests Don't Work

Restriction not applying?

Check:

  1. Is rule active?
  2. Product in right category/tag?
  3. Cache cleared?
  4. Correct address format?

Message not showing?

Check:

  1. Message configured in settings?
  2. Theme compatibility?
  3. JavaScript errors?
  4. Cart page customizations?

Wrong products restricted?

Check:

  1. Multiple rules applying?
  2. Category inheritance?
  3. Product overrides?
  4. Tag conflicts?

Testing Documentation

Keep Testing Records

Document your tests:

Test Date: March 15, 2024 Tester: Admin Test Type: State Restrictions Product: Wine Bottle Restriction: Block CA, NY Results: - CA address: ✅ Blocked correctly - NY address: ✅ Blocked correctly - TX address: ✅ Allowed correctly Issues found: None Status: PASSED

Test Plan Template

Before each major change:

Change: Adding new state restriction Date: [Date] Products affected: [Number] Tests to run: [ ] Existing restrictions still work [ ] New restriction blocks correctly [ ] Unaffected products still ship [ ] Messages display properly [ ] Mobile checkout works [ ] No JavaScript errors Sign-off: [Name]

Ongoing Testing

Regular Testing Schedule

Weekly:

  • Spot check one restriction
  • Test one checkout

Monthly:

  • Test all active rules
  • Review error logs
  • Check customer feedback

Quarterly:

  • Complete system test
  • Update test documentation
  • Review and optimize rules

After Updates

Test after:

  • WooCommerce updates
  • WordPress updates
  • Theme updates
  • Ship Restrict updates
  • Any plugin updates

Quick post-update test:

  1. One restricted product
  2. One checkout test
  3. Check for errors
  4. Verify messages

Getting Help with Testing

When to Get Help

Contact support if:

  • Tests work in staging but not live
  • Inconsistent test results
  • Theme compatibility issues
  • Complex multi-rule scenarios

Information to Provide

Include in support request:

  • Test steps taken
  • Expected result
  • Actual result
  • Screenshots
  • Test addresses used
  • Browser/device info

Remember: Thorough testing before launch prevents problems after launch. Take time to test properly - your customers and your business will thank you!