wcm-access-discounts

Compute WooCommerce Memberships access, drip timing, grants, and discounts correctly via official hooks and APIs.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill prevents subtle WooCommerce Memberships bugs by ensuring access checks, restriction/drip behavior, product grants, and member discounts are computed using the Memberships rule and pricing layers instead of simplified status or generic discount assumptions.

Core Features & Use Cases

  • Correct access control decisions: Use wc_memberships_user_can() (and the related restricted/public helpers) to determine whether a specific user can view or purchase a specific post/product object.
  • Accurate drip-content timing and start-time overrides: Extend or override access start timestamps via wc_memberships_access_from_time and wc_memberships_user_object_access_start_time to avoid date-meta mistakes.
  • Reliable product-grant and member-discount pricing: Resolve which parent/variation product grants access, and compute member discounts using the Memberships discount APIs and hooks such as wc_memberships_get_discounted_price and wc_memberships_get_member_product_discount.

Quick Start

Ask the AI to help you decide whether a given user can view a specific Memberships-protected product or post and which exact Memberships hook/API to use for your integration.

Frequently Asked Questions about wcm-access-discounts

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

FAQPage Schema
How do I check if a user can view a WooCommerce Memberships protected product?

Use the `wc_memberships_user_can()` function to accurately determine if a specific user can view or purchase a protected post or product object. This ensures access control decisions are evaluated through the Memberships rule layer.

How do I override WooCommerce Memberships drip content access start times?

Extend or override WooCommerce Memberships drip content access start timestamps using the `wc_memberships_access_from_time` and `wc_memberships_user_object_access_start_time` hooks. This prevents date-meta mistakes when scheduling content.

How do I apply member discounts to WooCommerce product prices correctly?

Compute WooCommerce member discounts using the Memberships discount APIs and hooks like `wc_memberships_get_discounted_price` and `wc_memberships_get_member_product_discount`. This correctly displays original versus discounted member prices.

How do I resolve parent and variation product grants in WooCommerce Memberships?

Resolve WooCommerce Memberships product grants by mapping parent and variation relationships within the Memberships rule layer. This ensures reliable access and discount pricing computations for specific protected objects.

Why are my WooCommerce Memberships access restrictions not working correctly?

WooCommerce Memberships access restrictions fail when code bypasses the Memberships rule layer or uses simplified status checks. Always use `wc_memberships_user_can()` and appropriate Memberships APIs for rule-level decisions.

Do I need to use Memberships APIs for custom WooCommerce discount logic?

Yes, custom WooCommerce discount logic must use Memberships hooks and APIs like `wc_memberships_get_discounted_price` to adjust prices. Bypassing this layer causes member pricing and restriction bugs.