WC_REST_Square_Cash_App_Settings_Controller.php
2 years ago
WC_REST_Square_Credit_Card_Payment_Settings_Controller.php
2 years ago
WC_REST_Square_Gift_Cards_Settings_Controller.php
1 year ago
WC_REST_Square_Settings_Controller.php
4 months ago
WC_Square_REST_Base_Controller.php
2 years ago
WC_Square_REST_Base_Controller.php
28 lines
| 1 | <?php |
| 2 | |
| 3 | namespace WooCommerce\Square\Admin\Rest; |
| 4 | |
| 5 | use WP_REST_Controller; |
| 6 | |
| 7 | /** |
| 8 | * REST controller for transactions. |
| 9 | */ |
| 10 | class WC_Square_REST_Base_Controller extends WP_REST_Controller { |
| 11 | |
| 12 | /** |
| 13 | * Endpoint namespace. |
| 14 | * |
| 15 | * @var string |
| 16 | */ |
| 17 | protected $namespace = 'wc/v3'; |
| 18 | |
| 19 | /** |
| 20 | * Verify access. |
| 21 | * |
| 22 | * Override this method if custom permissions required. |
| 23 | */ |
| 24 | public function check_permission() { |
| 25 | return current_user_can( 'manage_woocommerce' ); // phpcs:ignore WordPress.WP.Capabilities.Unknown |
| 26 | } |
| 27 | } |
| 28 |