PluginProbe
WCPOS – Point of Sale (POS) plugin for WooCommerce / 1.10.18
WCPOS – Point of Sale (POS) plugin for WooCommerce v1.10.18
1.10.19 1.10.18 1.10.17 1.10.16 1.10.15 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 All 163 releases
woocommerce-pos / includes / API / V1 / Shipping_Methods_Controller.php

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

39 lines 891 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * REST API WC Shipping Methods controller
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_Shipping_Methods_Controller' ) ) {
13 return;
14 }
15
16 use WCPOS\WooCommercePOS\Services\Permission_Rules;
17 use WC_REST_Shipping_Methods_Controller;
18
19 /**
20 * Shipping methods controller class.
21 */
22 class Shipping_Methods_Controller extends WC_REST_Shipping_Methods_Controller {
23
24 /**
25 * Endpoint namespace.
26 *
27 * @var string
28 */
29 protected $namespace = 'wcpos/v1';
30
31 /** Delegate the read decision, preserving WooCommerce's request-dependent checks.
32 *
33 * @param \WP_REST_Request $request Full request details.
34 */
35 public function get_items_permissions_check( $request ) {
36 return Permission_Rules::verdict( 'shipping_methods', 'read', (int) $request['id'], 0, 'v1', $request->get_params() );
37 }
38 }
39