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:
-
Restricted State Customer
- Name: Test Restricted
- Address: 123 Main St, Los Angeles, CA 90001
- Use for: Testing California restrictions
-
Allowed State Customer
- Name: Test Allowed
- Address: 456 Oak Ave, Austin, TX 78701
- Use for: Testing allowed locations
-
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:
-
Unrestricted Test Product
- Price: $1.00
- No restrictions
- Use for: Baseline testing
-
State Restricted Product
- Price: $1.00
- Restricted from CA, NY
- Use for: State restriction testing
-
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:
- Create rule blocking California
- Add product to this rule
Test steps:
- Add product to cart
- Go to checkout
- Enter California address
- Verify restriction message appears
- 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:
- Create rule blocking Chicago, IL
- Don't block rest of Illinois
Test steps:
- Test Chicago address → Should block
- Test Springfield, IL → Should allow
- Test variations: "chicago" vs "CHICAGO"
Common issues to check:
- City spelling variations
- Case sensitivity
- State-city pair format
Test 3: ZIP Code Restrictions
Setup:
- Add specific ZIP codes: 90210, 10001
- 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:
Location | Expected Result |
---|---|
California | ❌ Blocked |
New York | ❌ Blocked |
Texas | ✅ Allowed |
Florida | ✅ Allowed |
"Allow Only" Logic Test
Setup: Allow only TX, FL
Test matrix:
Location | Expected 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:
- California → Blocked by category
- New York → Blocked by tag
- Texas → Blocked by product
- 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:
- Add Small to cart → Ships everywhere
- Add Medium to cart → Blocked in CA only
- Add Large to cart → Blocked in CA and NY
- 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:
- Utah address → Blocked (category rule)
- Pennsylvania → Allowed (product override)
- Other states → Allowed
Testing Customer Experience
Cart Behavior Testing
Test these scenarios:
Scenario 1: Mixed Cart
Cart contents:
- Restricted product
- Unrestricted product
Test:
- Enter restricted address
- Restricted product removed
- Unrestricted product remains
- Can complete purchase
Scenario 2: All Products Restricted
Cart contents:
- All products restricted to location
Test:
- Enter restricted address
- All products removed
- Clear message explaining why
- 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:
- Browse → Add products
- Cart → View restrictions
- Checkout → Enter address
- Validation → See messages
- Resolution → Remove items
- 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:
-
Incognito/Private mode (Ctrl+Shift+N)
- Fresh session
- No cached data
- Like new customer
-
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:
- One restricted product → restricted address
- One allowed product → same address
- Same product → allowed address
- Check messages appear
- 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:
- Is rule active?
- Product in right category/tag?
- Cache cleared?
- Correct address format?
Message not showing?
Check:
- Message configured in settings?
- Theme compatibility?
- JavaScript errors?
- Cart page customizations?
Wrong products restricted?
Check:
- Multiple rules applying?
- Category inheritance?
- Product overrides?
- 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:
- One restricted product
- One checkout test
- Check for errors
- 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!