WP Manifestindependent plugin directory
manifest / ecommerce / shipping-class-restrictions

Shipping Class Restrictions

Restrict WooCommerce shipping method availability by the shipping classes in the cart, per method instance and zone.

★ 0stars
255composer installs

Install

Download source zip No release zip yet

This is the repository archive. It installs, but the folder name will carry the branch suffix and updates will not flow.

Install straight from GitHub with WP-CLI:

wp plugin install https://github.com/unlocnl/shipping-class-restrictions/archive/refs/heads/main.zip

On Packagist as unloc/shipping-class-restrictions:

composer require unloc/shipping-class-restrictions
No built-in updater. New versions won't appear under Dashboard → Updates. Install new releases yourself, or let Git Updater track the repository.

Restrict WooCommerce shipping methods by the shipping classes in the cart, per method instance and zone. Works with any third-party method.

Description

Adds two fields to every shipping method's settings (in the zone editor):

  • Availability: a single rule choosing when the method shows, based on the classes in the cart
  • Shipping classes: which classes the rule applies to (including "No shipping class")

Availability options:

  • Show only if cart contains only these classes
  • Show if cart contains any of these classes
  • Hide if cart contains any of these classes
  • Hide if cart contains only these classes

For example, a letterbox-only method can be set to "Show only if cart contains only [letterbox]", while the default parcel method is set to "Hide if cart contains only [letterbox]" — so the parcel method disappears for an all-letterbox cart but returns as soon as a parcel item is added. Because configuration is per method instance, it is inherently scoped to the shipping zone the instance belongs to.

Changelog

1.0.0

  • Initial release.