wc-checkout-block-payment-method

wc-checkout-block-payment-method is a skill for Codex from Lonsdale201/wp-agent-skills. It costs 134 tokens per session (2,416 once invoked), scanned A, original, MIT.

A guide to adding a payment method to WooCommerce's Checkout Block, the newer block-based checkout interface. It connects the server-side payment gateway, browser code, and Store API processing.

In plain words
What is it for?
Use it to build or review payment-method settings, checkout controls, saved payment tokens, client-side payment events, and payment processing for the Checkout Block.
Why use it?
It prevents the checkout display, payment data, and server-side payment handling from using mismatched identifiers or being treated as one layer.

Skill for Codex

Written for Codex: agents/openai.yaml present.

Good fit Use it to build or review payment-method settings, checkout controls, saved payment tokens, client-side payment events, and payment processing for the Checkout Block.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/lonsdale201/wp-agent-skills/wc-checkout-block-payment-method
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add Lonsdale201/wp-agent-skills --skill wc-checkout-block-payment-method
Clone the repo
git clone --depth 1 https://github.com/Lonsdale201/wp-agent-skills

Made for: Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for wc-checkout-block-payment-method

README.md
[![agentmods](https://agentmods.dev/badge/skills/lonsdale201/wp-agent-skills/wc-checkout-block-payment-method/github.svg)](https://agentmods.dev/skills/lonsdale201/wp-agent-skills/wc-checkout-block-payment-method)
Your own site
<a href="https://agentmods.dev/skills/lonsdale201/wp-agent-skills/wc-checkout-block-payment-method"><img src="https://agentmods.dev/badge/skills/lonsdale201/wp-agent-skills/wc-checkout-block-payment-method/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for wc-checkout-block-payment-method

Your own site · 80×15
<a href="https://agentmods.dev/skills/lonsdale201/wp-agent-skills/wc-checkout-block-payment-method"><img src="https://agentmods.dev/badge/skills/lonsdale201/wp-agent-skills/wc-checkout-block-payment-method.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 134 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,416 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00134 $0.02416
Opus 5 $0.00067 $0.01208
Sonnet 5 $0.00027 $0.00483
Haiku 4.5 $0.00013 $0.00242

Measured yesterday against content hash 294e501b6afb, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

wc-checkout-block-payment-method scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

woocommerce/wc-checkout-block-payment-method/SKILL.md · 230 lines

How it starts

The opening of the file, as written. The whole thing — 230 lines — stays where its author put it; the contents beside it link to each section on GitHub.

WooCommerce Checkout Block payment methods

A Checkout Block integration is an adapter around a payment gateway, not a replacement for it. Implement and test each layer deliberately.

Keep the four layers separate

Layer Responsibility
WC_Payment_Gateway Settings, availability, validation, server-side provider calls, refunds, and classic checkout
AbstractPaymentMethodType Registers Block assets and exposes non-secret settings to JavaScript
registerPaymentMethod() Renders the Block UI, reports availability, prepares opaque payment data, and handles client SDK events
Store API processing Bridges payment_data to process_payment() or an explicit PaymentContext/PaymentResult handler

Store API payment requirements only filter eligible methods. They do not register a payment UI or process money.

Use one stable identifier

Make these values equal unless a verified compatibility requirement says otherwise:

WC_Payment_Gateway::$id
AbstractPaymentMethodType::$name
registerPaymentMethod({ name })
registerPaymentMethod({ paymentMethodId })

paymentMethodId is what Checkout sends as payment_method and uses to find the PHP gateway. It defaults to name; set it explicitly if the client registration name differs. A provider payment-method type, wallet type, and Woo gateway ID are different identifiers and must not be conflated.

Register the PHP Blocks adapter

Register after woocommerce_blocks_loaded and guard the Blocks class:

use Automattic\WooCommerce\Blocks\Payments\Integrations\AbstractPaymentMethodType;
use Automattic\WooCommerce\Blocks\Payments\PaymentMethodRegistry;

final class MyPlugin_Blocks_Payment_Method extends AbstractPaymentMethodType {
    protected $name = 'myplugin_gateway';

    public function initialize(): void {
        $this->settings = get_option( 'woocommerce_myplugin_gateway_settings', array() );
    }

    public function is_active(): bool {
        return 'yes' === $this->get_setting( 'enabled', 'no' );
    }

    public function get_payment_method_script_handles(): array {
        $asset = file_exists( MYPLUGIN_PATH . 'build/checkout.asset.php' )
            ? require MYPLUGIN_PATH . 'build/checkout.asset.php'
            : array(
                'dependencies' => array( 'wc-blocks-registry', 'wc-settings', 'wp-element', 'wp-html-entities' ),
                'version'      => MYPLUGIN_VERSION,
            );

        wp_register_script(
            'myplugin-checkout-block',
            MYPLUGIN_URL . 'build/checkout.js',
            $asset['dependencies'],
            $asset['version'],
            true
        );
        wp_set_script_translations( 'myplugin-checkout-block', 'myplugin' );

        return array( 'myplugin-checkout-block' );
    }

    public function get_payment_method_data(): array {
        return array(
            'title'       => $this->get_setting( 'title', __( 'Pay securely', 'myplugin' ) ),
            'description' => $this->get_setting( 'description', '' ),
            'supports'    => $this->get_supported_features(),
        );
    }
}

add_action( 'woocommerce_blocks_loaded', static function (): void {
    if ( ! class_exists( AbstractPaymentMethodType::class ) ) {
        return;
    }

    add_action(
        'woocommerce_blocks_payment_method_type_registration',
        static function ( PaymentMethodRegistry $registry ): void {
            $registry->register( new MyPlugin_Blocks_Payment_Method() );
        }
    );
} );

Read the full file on GitHub · 230 lines

Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday Changed · -3 lines 294e501b6afb
  2. 9d ago First seen · 233 lines · 134 tokens per session scan A 216d818d75b9

Subscribe to this mod's changes

wc-checkout-block-payment-method is a skill published in the GitHub repository Lonsdale201/wp-agent-skills (22 stars, last pushed 2d ago), licensed MIT. It adds 134 tokens to every session and 2,416 once invoked, about $0.0007 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

Other skills, from other repositories

commerce-app-admin-ui

Add or modify Adobe Commerce Admin UI extensions on the commerce/backend-ui/2 extension point: custom grid columns, mass actions, order view buttons, and a custom Admin menu entry. Use whenever the user wants to extend the Commerce Admin — add a column to the order, product, or customer grid, add a bulk/mass action to…

adobe/skills · 102 tokens

shopify-developer

Complete Shopify development reference covering Liquid templating, OS 2.0 themes, GraphQL APIs, Hydrogen, Functions, and performance optimization (API v2026-01). Use when working with .liquid files, building Shopify themes or apps, writing GraphQL queries for Shopify, debugging Liquid errors, creating app extensions…

tech-leads-club/agent-skills · 127 tokens

static-seo

Audits and improves SEO for static HTML sites. Use when the user asks to audit, set up, or improve SEO on a static site (Hugo, Jekyll, 11ty, Gatsby, Next.js static export, hand-rolled HTML, or wp-static-clone output), or mentions head metadata, structured data, JSON-LD, sitemaps, IndexNow, Open Graph images, schema…

jdevalk/skills · 143 tokens

wp-static-clone

Clones a live WordPress (or other CMS-driven) site into a static HTML site deployable on any static host (Cloudflare Pages, Netlify, Vercel, S3+CloudFront, plain Apache/nginx). Use when the user wants to "scrape", "freeze", "archive", "static-ify", or "move to [host]" a WordPress site, or asks to turn a sitemap into…

jdevalk/skills · 137 tokens

billing-sdk

Guide for building billing UI with BillingSDK - the open-source React component library for pricing tables, subscription management, usage meters, invoice history, and customer portal flows wired to Dodo Payments.

dodopayments/skills · 41 tokens

shopify-hydrogen

Hydrogen storefront implementation cookbooks. Some of the available recipes are: B2B Commerce, Bundles, Combined Listings, Custom Cart Method, Dynamic Content with Metaobjects, Express Server, Google Tag Manager Integration, Infinite Scroll, Legacy Customer Account Flow, Markets, Partytown + Google Tag Manager…

display-design-studio/skills · 106 tokens