wc-shipping-method

Register WooCommerce shipping methods with per-zone field control via init_form_fields.

21|1|Updated Apr 29, 2026
One-click install
npx skills add https://github.com/Lonsdale201/wp-agent-skills --skill wc-shipping-method
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: wc-shipping-method
Source: https://github.com/Lonsdale201/wp-agent-skills/tree/main/woocommerce/wc-shipping-method
Command: npx skills add https://github.com/Lonsdale201/wp-agent-skills --skill wc-shipping-method

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Configure WooCommerce shipping methods to expose only the fields you want in per-zone modals, reducing clutter and admin confusion. This skill describes how to declare fields with init_form_fields(), control modal visibility via the supports flags, and optionally remove the settings UI entirely when external config is used.

Core Features & Use Cases

  • Precise field control: Declare only the fields you want via init_form_fields; the modal renders exactly those fields.
  • Modal visibility control: Configure the per-zone modal using the supports array to enable or suppress the modal.
  • No settings UI option: Exclude instance-settings to provide no per-zone UI when configuration lives elsewhere.

Quick Start

Register a WooCommerce shipping method with PHP-controlled per-zone fields and an optional settings modal.

Frequently Asked Questions about wc-shipping-method

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I control which fields appear in a WooCommerce shipping method zone settings modal?

To control WooCommerce shipping method zone settings, declare specific fields using the init_form_fields() method so the per-zone modal renders only those exact fields, reducing admin clutter.

Can I hide the settings modal entirely for a custom WooCommerce shipping method?

Yes, you can hide the settings modal for a WooCommerce shipping method by configuring the supports array flags to suppress instance-settings, which removes the per-zone UI completely.

How do I register a WooCommerce shipping method with minimal per-zone configuration?

Register a WooCommerce shipping method by enforcing explicit field declarations via init_form_fields, controlling modal visibility through supports flags, and ensuring proper load and save hooks are attached.

WooCommerce shipping method not showing fields in zone settings, how do I fix it?

If fields are missing in WooCommerce zone settings, ensure you have explicitly declared them within the init_form_fields array and that the supports array includes the instance-settings flag for modal rendering.

When should I exclude the settings UI from a WooCommerce shipping method?

Exclude the settings UI from a WooCommerce shipping method when configuration lives elsewhere externally, omitting the instance-settings support flag to provide no per-zone UI within the modal.

Does this approach to WooCommerce shipping methods work for plugin auditing tasks?

Yes, this approach works for plugin development and auditing tasks where a WooCommerce shipping method must expose a precise, minimal form or no UI at all within the zone settings.