# woocommerce-pos/trunk/includes/API/V1/Shipping_Methods_Controller.php

WCPOS – Point of Sale (POS) plugin for WooCommerce, version trunk. 43 lines.

- Page: https://pluginprobe.com/plugins/woocommerce-pos/trunk/code/includes/API/V1/Shipping_Methods_Controller.php
- Raw: https://pluginprobe.com/plugins/woocommerce-pos/trunk/raw/includes/API/V1/Shipping_Methods_Controller.php
- Modified: 2026-08-25T07:52:20+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/woocommerce-pos/trunk/code/includes/API/V1/Shipping_Methods_Controller.php#L10-L20`.

```php
<?php
/**
 * REST API WC Shipping Methods controller
 *
 * @package WCPOS\WooCommercePOS
 */

namespace WCPOS\WooCommercePOS\API\V1;

\defined( 'ABSPATH' ) || die;

if ( ! class_exists( 'WC_REST_Shipping_Methods_Controller' ) ) {
	return;
}

use WC_REST_Shipping_Methods_Controller;

/**
 * Shipping methods controller class.
 */
class Shipping_Methods_Controller extends WC_REST_Shipping_Methods_Controller {

	/**
	 * Endpoint namespace.
	 *
	 * @var string
	 */
	protected $namespace = 'wcpos/v1';

	/**
	 * Check whether a given request has permission to view shipping methods.
	 *
	 * @param  \WP_REST_Request $request Full details about the request.
	 * @return \WP_Error|boolean
	 */
	public function get_items_permissions_check( $request ) {
		if ( current_user_can( 'access_woocommerce_pos' ) ) {
			return true;
		}
		return parent::get_items_permissions_check( $request );
	}
}

```
