RequiresManageWoocommerce.php
18 lines
| 1 | <?php |
| 2 | |
| 3 | declare(strict_types=1); |
| 4 | |
| 5 | namespace Automattic\WooCommerce\Api\Traits; |
| 6 | |
| 7 | use Automattic\WooCommerce\Api\Attributes\RequiredCapability; |
| 8 | |
| 9 | /** |
| 10 | * Trait that grants the manage_woocommerce capability requirement. |
| 11 | * |
| 12 | * Classes using this trait inherit the capability via the builder's |
| 13 | * resolve_capabilities() method, which inspects traits for attributes. |
| 14 | */ |
| 15 | #[RequiredCapability( 'manage_woocommerce' )] |
| 16 | trait RequiresManageWoocommerce { |
| 17 | } |
| 18 |