swissChili | f0cbdc3 | 2023-01-05 17:21:38 -0500 | [diff] [blame] | 1 | <?php |
| 2 | /** |
| 3 | * Class WC_Stripe_REST_Base_Controller |
| 4 | */ |
| 5 | |
| 6 | defined( 'ABSPATH' ) || exit; |
| 7 | |
| 8 | /** |
| 9 | * REST controller for transactions. |
| 10 | */ |
| 11 | class WC_Stripe_REST_Base_Controller extends WP_REST_Controller { |
| 12 | |
| 13 | /** |
| 14 | * Endpoint namespace. |
| 15 | * |
| 16 | * @var string |
| 17 | */ |
| 18 | protected $namespace = 'wc/v3'; |
| 19 | |
| 20 | /** |
| 21 | * Verify access. |
| 22 | * |
| 23 | * Override this method if custom permissions required. |
| 24 | */ |
| 25 | public function check_permission() { |
| 26 | return current_user_can( 'manage_woocommerce' ); |
| 27 | } |
| 28 | } |