• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

WP SITES

2785

Original Genesis & WooCommerce Tutorials & 6000+ Guaranteed Code

Snippets

  • Checkout
  • Cart
  • Videos

Restrict Shipping To Specific States in WooCommerce

$75.00

Category: WooCommerce Tags: woocommerce_package_rates, woocommerce_states
  • Description

This code enables you to exclude states from the drop down menu on the checkout page for any country in WooCommerce. You can :

  • Exclude shipping to specific states in America
  • Restrict shipping to only 1 or more states in Australia
  • Remove states from the billing and shipping drop down menus for any other country

In this example, all U.S states are removed except California and Pennsylvania.

Remove U.S States from WC Shipping

In this example, only 3 states from Australia can be selected.

Remove Australian States from WooCommerce Shipping drop down menu

Installation

Copy & paste the PHP code to the end of your child themes functions file or custom functionality plugin.

2 code snippets are included for the United Stated and Australia. For use with other countries, swapout the country and state codes in the PHP code.

Primary Sidebar

Cart

Code written by Brad Dalton specialist for WooCommerce with more than 10 years of experience.

Advertise · WPEngine · Genesis · Log in

  • Code Snippets
  • Tutorials
  • Videos
  • Account
  • Checkout
  • Cart
 

Loading Comments...
 

You must be logged in to post a comment.