Last Modified: KB » WooCommerce Restrictions
Packaging Custom Capabilities for Sale

Selling a Customer access to a Custom Capability (CCAP) implies that you are going to check for this CCAP somewhere in your theme, plugin, or in conditionals that you add to a Post.

For example, if(current_user_can('access_ccap_something') where something is a CCAP you created. If the Customer paid for access to a Restriction that protects the CCAP something, they can access it. Otherwise, they cannot access it.

Generally speaking, CCAPs do nothing by themselves. They are only effective if you have custom conditionals somewhere that check for CCAPs.

Dashboard Location

DashboardRestrictionsAdd Restriction

Packaging Custom Capabilities Screenshot

This is where you create new Restrictions. There is a meta box here called Protected Custom Capabilities where you can create a package for Custom Capabilities. Type the name of one or more Custom Capabilities in a comma-delimited list in the text box.

Note: Custom Capabilities are automatically prefixed with access_ccap_ internally.

When you have finished creating Restrictions, click the Create Restriction button at the top-right of the page.