Plugin slug: goup-shipping-method-by-category · Version: 1.0.5 · Author: GoUpWP · https://goupwp.com/plugins/shipping-method-by-category
What it does
Hides or restricts WooCommerce shipping methods depending on the product categories in the cart. Typical uses: no free shipping for bulky furniture, pickup only for fresh food, a courier-only category. Rules can target a specific shipping instance (for example "Free shipping — UK") or every instance of a type.
Works with the classic cart/checkout, the Cart and Checkout Blocks (rates are filtered server-side) and HPOS.
Installation
- Download the plugin ZIP from your GoUpWP account (Account → Licenses → Download).
- In WordPress go to Plugins → Add New → Upload Plugin, choose the ZIP and click Install Now, then Activate.
- WooCommerce must be installed and active; the plugin shows a notice and stays idle until it is.
- Open WooCommerce → License: Shipping Method by Category and paste the license key from your account. Activation unlocks
one-click updates and support for this site. A
localhost,*.test,*.localorstaging.site counts as a staging activation and does not use your production seat.
The plugin keeps working if the license expires: only updates and support pause until it is renewed.
Setup
Open WooCommerce → Shipping by Category → Rules → Add rule.
- Categories (optionally including child categories) and Match: ANY or ALL selected categories must be represented by shippable products in the package.
- Target: Instance (specific zone methods, including the Checkout Block's pickup locations) or Type.
- Action: Disable the selected methods, or Allow only the selected methods.
- Priority orders evaluation; every matching rule applies.
Settings: Safety mode (Safe restores all rates if the rules would leave none, Strict shows none), debug logging and the uninstall policy. Rules can be exported/imported as JSON.
How caching works
WooCommerce caches shipping rates per cart. Every rule change bumps an internal version that is stamped on each shipping package, so new rules take effect immediately without customers clearing their carts.
Testing
The Tester tab evaluates the rules against chosen categories and lists the rates that would remain. Diagnostics lists zones, instances and rule counts.
Developer hooks
goup_smbc_rules( array ),goup_smbc_rule_matches( bool, array $rule, array $categories ),goup_smbc_matching_rules( array, array $categories )goup_smbc_package_categories( array $term_ids, array $package ),goup_smbc_include_child_categories( array $ancestors, int $term_id, array $rule )goup_smbc_category_match( bool, array $rule, array $categories ),goup_smbc_shipping_method_match( bool, array $descriptor, array $rule )goup_smbc_original_rates( array, array $package, array $categories ),goup_smbc_filtered_rates( array, array $original, array $package, array $matched, array $categories )goup_smbc_safe_mode( bool, array $package, array $matched ),goup_smbc_settings_before_save( array ); actiongoup_smbc_rules_changed.
Troubleshooting
- Rates unchanged — only shippable (non-virtual) products count; confirm the product's categories and the rule's target instance. Enable Debug logging and read WooCommerce → Status → Logs.
- Rule editor or Diagnostics showed an error — fixed in 1.0.3; update the plugin.
Updates and licensing
- Updates arrive through the normal Dashboard → Updates and Plugins screens. Every package is downloaded over a signed, time-limited link and verified against its SHA-256 checksum before WordPress installs it.
- View details on the Plugins screen shows the changelog for the new version.
- If the license is not active you still see that an update exists; the row explains that renewing restores one-click updates.
- The license page shows the installed version, the environment this site was classified as (production or staging), your activation counts and the renewal date, and has a Check for updates button.
- Deactivate on this site frees the seat so the key can be used on another site. Deleting the plugin from the Plugins screen also frees the seat automatically.
- Nothing is sent to goupwp.com except the license key, an installation ID, the site URL and the WordPress, PHP and plugin versions used for compatibility checks.
Support and maintenance
- Open a ticket from Account → Support on goupwp.com; include the output of the plugin's Diagnostics tab.
- Keep WordPress, WooCommerce and the plugin updated and test changes on a staging site first.
- The plugin declares compatibility with WooCommerce High-Performance Order Storage (HPOS) and the Cart and
Checkout Blocks, and is translation-ready (
languages/). - Uninstalling removes the plugin's data only when the Delete data on uninstall option is enabled, so a reinstall keeps your configuration; license data is always removed.
Release history
1.0.5 27 September 2026 · tested with WordPress 7.1
- Hardened JSON imports with POST/capability/nonce enforcement, extension and exact-size checks, JSON depth/schema validation, a 500-rule limit, duplicate detection and all-or-nothing rule validation.
- Protected checkout from malformed extension/filter values and prevented hooks from injecting arbitrary rate records or corrupting stored rule/settings shapes.
- Added bounded rule fields, category/method collections and privacy-safe logger context to resist oversized configuration and log payloads.
- Rebuilt the category candidate cache when filtered rules change, preserving correct dynamic integrations during a request.
- Refined the responsive GoUpWP blue admin experience, rule table, status chips and controls while retaining the shared GoUpWP logo header.
- Expanded focused regression coverage for filter failures, data invariants, bounds, cache invalidation and malformed rate descriptors.
1.0.4 26 September 2026 · tested with WordPress 7.1
- GoUpWP admin identity: every plugin screen now opens with a GoUpWP header showing the plugin name, version, documentation, support and licence status.
- GoUpWP styling for settings, rule tables, tabs, cards and buttons, scoped to this plugin's screens so WordPress and other plugins are untouched.
- GoUpWP mark on the Plugins screen, Documentation and Support links in the plugin row, and GoUpWP icons on the Dashboard → Updates screen.
1.0.3 20 September 2026 · tested with WordPress 7.1
- Updates: the installer now fetches a freshly signed download link at install time and verifies the SHA-256 checksum, so "Update now" works hours after WordPress last checked for updates.
- Updates: update checks are cached for six hours and the Plugins screen shows a clear message (with a link to the license page) when an update exists but the license is not active.
- License screen: named per plugin in the WooCommerce menu, shows the installed version and a "Check for updates" button, and every string is translatable.
- Plugins screen: Settings and License links on the plugin row.
- Uninstall: releases the license seat on goupwp.com and removes all license data, regardless of the data-retention setting.
- Code style: all source files expanded to readable, documented PHP.
- Fixed a fatal error when opening the rule editor and the Diagnostics tab (shipping zones could not be loaded).
- Unit tests covering instance/type targeting, allow-only and disable actions, child categories and ALL mode.
1.0.2 20 September 2026 · tested with WordPress 7.1
- License screen now explains activation failures (unrecognised key, wrong plugin, site limit reached, expired) and shows the environment, activation counts and end date.
- Activate and Deactivate always contact goupwp.com immediately instead of waiting out a network backoff.
1.0.1 20 September 2026 · tested with WordPress 7.1
- Added the GoUpWP licensing and update client.
- Normalized plugin headers and code style.