wcs-renewal-scheduler

Schedule WooCommerce Subscriptions renewals via WCS lifecycle hooks and WC_Subscription methods.

Updated Aug 27, 2026
One-click install
npx skills add https://github.com/vikingokft/wp-agent-skills --skill wcs-renewal-scheduler-vikingokft
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: wcs-renewal-scheduler
Source: https://github.com/vikingokft/wp-agent-skills/tree/main/woocommerce/wcs-renewal-scheduler
Command: npx skills add https://github.com/vikingokft/wp-agent-skills --skill wcs-renewal-scheduler-vikingokft

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill prevents broken or duplicate WooCommerce Subscriptions renewal scheduling by guiding you to use the official WCS renewal scheduler flow and lifecycle hooks instead of directly modifying schedule meta or Action Scheduler rows.

Core Features & Use Cases

  • Safe renewal timing changes: Updates subscription dates and statuses via WC_Subscription methods (e.g., update_dates()) so WCS can validate ordering and reschedule canonical Action Scheduler events.
  • Correct renewal flow control: Triggers the scheduled renewal action and creates renewal orders using wcs_create_renewal_order() and wcs_renewal_order_created instead of manual scheduling shortcuts.
  • Gateway-specific recurring charge wiring: Uses the gateway-specific scheduled action hook pattern woocommerce_scheduled_subscription_payment_{gateway_id} for WCS-managed renewals.
  • Right business side-effect hooks: Distinguishes “any subscription payment complete” vs “renewal payment complete/failed” and supports retry-related observability without violating retry system invariants.

Quick Start

Use wcs-renewal-scheduler to update a subscription’s next renewal date to 2026-05-15 10:00:00 UTC by calling WC_Subscription::update_dates() rather than editing _schedule_next_payment directly.

Frequently Asked Questions about wcs-renewal-scheduler

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

FAQPage Schema
How do I change the next payment date on a WooCommerce Subscription without breaking the renewal schedule?

To change the next payment date safely, use the `WC_Subscription::update_dates()` method rather than editing `_schedule_next_payment` meta directly. This allows WooCommerce Subscriptions to validate date ordering and automatically reschedule canonical Action Scheduler events.

Why does my WooCommerce Subscription have duplicate or missing renewal orders?

Duplicate or missing renewal orders usually happen when developers bypass the WCS scheduler lifecycle and directly manipulate Action Scheduler rows. You must use `wcs_create_renewal_order()` and the `wcs_renewal_order_created` hook to ensure correct renewal flow control and order generation.

How do I trigger a gateway recurring charge for a WooCommerce Subscription renewal?

You trigger gateway recurring charges by using the gateway-specific scheduled action hook pattern `woocommerce_scheduled_subscription_payment_{gateway_id}`. This ensures WCS manages the renewal process correctly instead of relying on manual scheduling shortcuts.

What hooks should I use to observe WooCommerce Subscription renewal payment failures and retries?

Use the `woocommerce_subscription_renewal_payment_complete` and `woocommerce_subscription_renewal_payment_failed` hooks to distinguish renewal payment outcomes. These hooks support retry-related observability without violating the retry system invariants.

Can I directly modify Action Scheduler rows to force a WooCommerce Subscription renewal?

Directly modifying Action Scheduler rows or subscription meta is strongly discouraged. Forcing or rescheduling renewals safely requires using the official `WC_Subscription` date and status methods so the WCS scheduler lifecycle can validate and process the events correctly.

What is the difference between any subscription payment complete and renewal payment complete hooks?

The “any subscription payment complete” hook fires for all payments, while the “renewal payment complete” hook fires specifically for renewal orders. Using the correct renewal-specific hook ensures accurate business side-effects and proper retry behavior tracking.