Selling fresh, live or restricted products are commonly only allowed to be picked up in the store and not getting shipped. If these are the only type of products sold and pickup is the only option its an easy setup to configure. Also have products that can be shipped? Or that are shipping only? This will require a more complex setup. In this post I’ll show how you how this can be setup in WooCommerce in combination with the Advanced Shipping Packages plugin.
Pickup Only Shipping Class
Shipping classes are used to group together and identify which products will be available to pickup only. Other products can have any other shipping class or none assigned at all. To create a new shipping class, go to WooCommerce > Settings > Shipping > Shipping classes.
After adding a class there, assign the newly created shipping class to the products that are pickup only. The field to configure the shipping class for a product is within the Shipping tab with the Product Data settings.
Local Pickup Shipping Rate
The next step is setting up the local pickup shipping rate. Within the WooCommerce Shipping Zones create a new rate within the zone the Pickup option should be available for. If you want this available for all customers, make sure to add this option to all Zones.
So far we’ve setup the shipping classes, assigned these to the product(s) and created a shipping rate. Now its time for the more complex part of this setup; making sure the shipping options are the cart are displayed correctly for the local pickup only products. For this we’ll be using the Advanced Shipping Packages plugin.
Local Pickup Only Shipping Package
We’ll start by setting up the ‘Local Pickup Only’ shipping package. Under the WooCommerce > Settings > Shipping > Packages section add a new package.
Within the newly created package a few things will need to be configured. Lets start with the conditions. There are two conditional areas to configure. The top section determines IF a package is created. In here we can use the ‘(Cart) Contains shipping class – equal to – Pickup Only’ condition to check there are any products in the cart that are only allowed for local pickup.
The lower conditional section determines what products are placed in the package when it matches the conditions in the top section. In this package we want to include all the local pickup only products. With this requirement the same type of condition be used; – Shipping class – equal to – Pickup Only’.
Removing Shipping Methods
As this package is meant to include the Pickup Only products any other shipping options need to be excluded. Using the ‘Exclude shipping methods’ field you can exclude shipping options. Use the options within the ‘Methods (any zone)’ option group to target all the shipping method options within all zones.
Alternatively the ‘Exclude shipping methods’ setting can be reversed to change it to a ‘Whitelist shipping methods’ setting with the rotating icon. With this you can select the ‘Local pickup’ option to ensure this is and in the future will be the only option available. Especially useful if you expect to add new shipping plugins in the future that add different shipping methods.
When you’ve completed setting up everything described above and there are also other products in the cart these can be included in the Pickup package, or they can be displayed as a separate package from the Pickup Only products.
Including Other Products in Pickup Package
Use the ‘Add OR Group’ button to add a new condition group. Within this condition group its possible to setup a new condition to place additional products in the package. With the example below it will place all products with the ‘Fresh’ shipping class within the package as well.
Or when you want the customer to pickup all the products ordered, all products can be placed in the package;
Display Products in a Separate Package
This is the default, with the pickup only products already in their own package, any remaining products will be displayed separately in the default shipping package. In case you want to change the package name or exclude a shipping option for these products a separate package can be created for this.
This can be done by creating a separate shipping class for these products (this will have to be created and assigned to these products) as shown in the below image, or by creating a fallback package that includes all remaining products.