Documentation

WooCommerceCapability : string
in package
implements CapabilityInterface

Closed catalog of WooCommerce capabilities.

Kept separate from WpCapability because WooCommerce is optional: these capabilities are registered dynamically by WooCommerce (WC_Install) and only exist on a role while the plugin is active. Referencing a case here is a plain inert string and does NOT require WooCommerce to be loaded — but actually granting one only makes sense once the WooCommerce roles (e.g. shop_manager) exist. The backed value is the exact string WooCommerce expects.

Cases cover the top-level gate caps plus the full post-type cap families for the product, shop_order, and shop_coupon post types. The singular object-scoped forms (edit_product, read_shop_order, ...) are META capabilities (see self::isMeta()) resolved by map_meta_cap(); the plural/collection and *_terms forms are primitives stored on roles.

Table of Contents

Interfaces

CapabilityInterface

Cases

AssignProductTerms  = 'assign_product_terms'
AssignShopCouponTerms  = 'assign_shop_coupon_terms'
AssignShopOrderTerms  = 'assign_shop_order_terms'
CreateCustomers  = 'create_customers'
DeleteOthersProducts  = 'delete_others_products'
DeleteOthersShopCoupons  = 'delete_others_shop_coupons'
DeleteOthersShopOrders  = 'delete_others_shop_orders'
DeletePrivateProducts  = 'delete_private_products'
DeletePrivateShopCoupons  = 'delete_private_shop_coupons'
DeletePrivateShopOrders  = 'delete_private_shop_orders'
DeleteProduct  = 'delete_product'
DeleteProducts  = 'delete_products'
DeleteProductTerms  = 'delete_product_terms'
DeletePublishedProducts  = 'delete_published_products'
DeletePublishedShopCoupons  = 'delete_published_shop_coupons'
DeletePublishedShopOrders  = 'delete_published_shop_orders'
DeleteShopCoupon  = 'delete_shop_coupon'
DeleteShopCoupons  = 'delete_shop_coupons'
DeleteShopCouponTerms  = 'delete_shop_coupon_terms'
DeleteShopOrder  = 'delete_shop_order'
DeleteShopOrders  = 'delete_shop_orders'
DeleteShopOrderTerms  = 'delete_shop_order_terms'
EditOthersProducts  = 'edit_others_products'
EditOthersShopCoupons  = 'edit_others_shop_coupons'
EditOthersShopOrders  = 'edit_others_shop_orders'
EditPrivateProducts  = 'edit_private_products'
EditPrivateShopCoupons  = 'edit_private_shop_coupons'
EditPrivateShopOrders  = 'edit_private_shop_orders'
EditProduct  = 'edit_product'
EditProducts  = 'edit_products'
EditProductTerms  = 'edit_product_terms'
EditPublishedProducts  = 'edit_published_products'
EditPublishedShopCoupons  = 'edit_published_shop_coupons'
EditPublishedShopOrders  = 'edit_published_shop_orders'
EditShopCoupon  = 'edit_shop_coupon'
EditShopCoupons  = 'edit_shop_coupons'
EditShopCouponTerms  = 'edit_shop_coupon_terms'
EditShopOrder  = 'edit_shop_order'
EditShopOrders  = 'edit_shop_orders'
EditShopOrderTerms  = 'edit_shop_order_terms'
ManageProductTerms  = 'manage_product_terms'
ManageShopCouponTerms  = 'manage_shop_coupon_terms'
ManageShopOrderTerms  = 'manage_shop_order_terms'
ManageWooCommerce  = 'manage_woocommerce'
PublishProducts  = 'publish_products'
PublishShopCoupons  = 'publish_shop_coupons'
PublishShopOrders  = 'publish_shop_orders'
ReadPrivateProducts  = 'read_private_products'
ReadPrivateShopCoupons  = 'read_private_shop_coupons'
ReadPrivateShopOrders  = 'read_private_shop_orders'
ReadProduct  = 'read_product'
ReadShopCoupon  = 'read_shop_coupon'
ReadShopOrder  = 'read_shop_order'
ViewWooCommerceReports  = 'view_woocommerce_reports'

Methods

isMeta()  : bool
toString()  : string

Cases

Methods

On this page

Search results