PluginProbe
WCPOS – Point of Sale (POS) plugin for WooCommerce / trunk
WCPOS – Point of Sale (POS) plugin for WooCommerce vtrunk
1.10.13 1.10.14 1.10.12 1.10.11 1.10.10 1.10.9 1.10.8 untagged-3d9b7ccddc54df87c672 1.10.7 1.10.6 1.10.5 1.10.3 1.10.4 1.10.2 1.10.1 1.10.0 1.9.17 1.9.15 1.9.16 1.9.14 1.9.13 1.9.12 1.9.11 1.9.10 1.9.9 All 158 releases
woocommerce-pos / includes / API / V1 / Tax_Classes_Controller.php

Tax_Classes_Controller.php in WCPOS – Point of Sale (POS) plugin for WooCommerce trunk, at includes/API/V1/Tax_Classes_Controller.php

43 lines 867 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * REST API Tax Classes controller class.
4 *
5 * @package WCPOS\WooCommercePOS
6 */
7
8 namespace WCPOS\WooCommercePOS\API\V1;
9
10 \defined( 'ABSPATH' ) || die;
11
12 if ( ! class_exists( 'WC_REST_Tax_Classes_Controller' ) ) {
13 return;
14 }
15
16 use WC_REST_Tax_Classes_Controller;
17
18 /**
19 * REST API Tax Classes controller class.
20 */
21 class Tax_Classes_Controller extends WC_REST_Tax_Classes_Controller {
22
23 /**
24 * Endpoint namespace.
25 *
26 * @var string
27 */
28 protected $namespace = 'wcpos/v1';
29
30 /**
31 * Check whether a given request has permission to view tax classes.
32 *
33 * @param \WP_REST_Request $request Full details about the request.
34 * @return \WP_Error|boolean
35 */
36 public function get_items_permissions_check( $request ) {
37 if ( current_user_can( 'access_woocommerce_pos' ) ) {
38 return true;
39 }
40 return parent::get_items_permissions_check( $request );
41 }
42 }
43