wcs-subscription-hooks

wcs-subscription-hooks is a skill for Claude Code, Codex from Lonsdale201/wp-agent-skills. It costs 106 tokens per session (5,630 once invoked), scanned A, original, MIT.

A reference map for WooCommerce Subscriptions hooks, which are code points where an extension can react to events. It covers subscription lifecycles, renewals, payments, retries, switching, gifting, REST actions, and account or admin screens.

In plain words
What is it for?
Use it to choose hooks for integrations that respond to status changes, scheduled payments, renewal orders, gateway events, switching, or gifting.
Why use it?
Subscriptions have their own objects and lifecycle rather than being ordinary orders. Using the wrong hook can cause code to run at the wrong time or miss important subscription events.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to choose hooks for integrations that respond to status changes, scheduled payments, renewal orders, gateway events, switching, or gifting.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/lonsdale201/wp-agent-skills/wcs-subscription-hooks
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 wcs-subscription-hooks
Clone the repo
git clone --depth 1 https://github.com/Lonsdale201/wp-agent-skills

Made for: Claude Code, 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 wcs-subscription-hooks

README.md
[![agentmods](https://agentmods.dev/badge/skills/lonsdale201/wp-agent-skills/wcs-subscription-hooks/github.svg)](https://agentmods.dev/skills/lonsdale201/wp-agent-skills/wcs-subscription-hooks)
Your own site
<a href="https://agentmods.dev/skills/lonsdale201/wp-agent-skills/wcs-subscription-hooks"><img src="https://agentmods.dev/badge/skills/lonsdale201/wp-agent-skills/wcs-subscription-hooks/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 wcs-subscription-hooks

Your own site · 80×15
<a href="https://agentmods.dev/skills/lonsdale201/wp-agent-skills/wcs-subscription-hooks"><img src="https://agentmods.dev/badge/skills/lonsdale201/wp-agent-skills/wcs-subscription-hooks.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 106 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 5,630 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.00106 $0.05630
Opus 5 $0.00053 $0.02815
Sonnet 5 $0.00021 $0.01126
Haiku 4.5 $0.00011 $0.00563

Measured 7d ago against content hash 06bcd7887b91, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

wcs-subscription-hooks 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 7d ago.

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/wcs-subscription-hooks/SKILL.md · 268 lines

How it starts

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

WooCommerce Subscriptions: hook map

Use this when building or reviewing an integration that needs to react to WooCommerce Subscriptions events. This is not an exhaustive dump of the 800+ hook calls in the plugin. It is a decision map for the hooks that are usually correct and the older/noisy hooks that AI agents tend to choose incorrectly.

Misconception this skill corrects

"Subscriptions are just orders, so hook woocommerce_order_status_changed or update _schedule_next_payment meta directly."

Subscriptions are WC_Subscription objects with their own lifecycle hooks, status transition hooks, date hooks, relation store, renewal order hooks, and scheduler bridge. Prefer WCS hooks and CRUD methods unless the task explicitly needs ordinary WC orders.

When to use this skill

Trigger when ANY of the following is true:

  • The user asks for WooCommerce Subscriptions actions/filters, lifecycle hooks, renewal hooks, status hooks, payment retry hooks, switching hooks, or gifting hooks.
  • You see WC_Subscription, wcs_get_subscription(), wcs_create_subscription(), wcs_create_renewal_order(), woocommerce_scheduled_subscription_payment, wcs_renewal_order_created, payment_retry, wcsg_, or subscription_switch.
  • You need to decide whether to hook at subscription creation, renewal order creation, gateway payment attempt, successful payment, failed payment, status change, or scheduled action time.

Workflow

  1. Identify the lifecycle point first: creation, status, date schedule, renewal order, gateway charge, retry, switch/gift, or UI/API.
  2. Prefer hooks that pass WC_Subscription or WC_Order objects over legacy hooks that pass subscription keys.
  3. For dynamic hooks, expand the real hook name from the runtime value: status, date type, payment method ID, or order relation type.
  4. Before implementing, inspect the exact source line in the installed plugin with:
rg -n "hook_name|function_name" wp-content/plugins/woocommerce-subscriptions/includes wp-content/plugins/woocommerce-subscriptions/src

Read the full file on GitHub · 268 lines

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. 7d ago First seen · 268 lines · 106 tokens per session scan A 06bcd7887b91

Subscribe to this mod's changes

wcs-subscription-hooks is a skill published in the GitHub repository Lonsdale201/wp-agent-skills (22 stars, last pushed today), licensed MIT. It adds 106 tokens to every session and 5,630 once invoked, about $0.0005 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-business-config

Manage custom business configuration in an Adobe Commerce app. Use when the user wants to add, modify, or remove merchant-configurable settings (config fields, admin config, store configuration) exposed through Commerce Admin. Creates typed config fields (text, password, email, url, tel, boolean, list) in…

adobe/skills · 80 tokens

doku-payment-gateway

Expert guide for integrating DOKU Payment Gateway (Jokul API v2). Covers HMAC-SHA256 header signature calculation, Checkout & Direct APIs (VA, QRIS, E-Wallet, Credit Card), webhook notification verification, and sandbox/production setup / Panduan ahli integrasi DOKU Payment Gateway.

roedyrustam/vibes-plug · 71 tokens

webhook-integration

Complete guide for setting up and handling Dodo Payments webhooks for real-time payment event notifications.

dodopayments/skills · 24 tokens

better-auth-integration

Guide only for applications using @dodopayments/better-auth, covering authenticated customer sync, checkout, portal access, usage ingestion, and verified webhook callbacks.

dodopayments/skills · 37 tokens

newebpay-checkout

A checkout integration for NewebPay’s MPG payment service, which provides an online payment page. It includes encrypted payment data, an HTML form submission, and callback endpoints for payment results.

paid-tw/skills · 48 tokens

kryptogo-pay-webhook

A callback endpoint for KryptoGO Payment, which sends your application updates about a payment. It handles pending, successful, expired, insufficient, and refunded outcomes.

paid-tw/skills · 47 tokens