📁 File Manager Pro
v10.0.2 | PHP: 8.1.34
Server: LiteSpeed
2026-06-26 13:33:25
📂
/
/
home
/
pallabnv
/
public_html
/
wp-content__3bb9dea
/
plugins
/
woocommerce
/
src
/
Api
/
Attributes
✏️
Editing: RequiredCapability.php
<?php declare(strict_types=1); namespace Automattic\WooCommerce\Api\Attributes; use Attribute; /** * Declares a WordPress capability required to execute a query or mutation. * * The generated resolver checks `current_user_can()` for every declared * capability before invoking the command. If any check fails, an * UNAUTHORIZED error is returned. This attribute is repeatable: apply it * multiple times to require several capabilities. * * Mutually exclusive with #[PublicAccess] on the same class. */ #[Attribute( Attribute::IS_REPEATABLE | Attribute::TARGET_CLASS )] final class RequiredCapability { /** * Constructor. * * @param string $capability A WordPress capability slug * (e.g. 'manage_woocommerce'). */ public function __construct( public readonly string $capability, ) { } }
💾 Save Changes
❌ Cancel