ProductShippingClasses

This commit is contained in:
Mike Jolley 2019-05-30 13:37:25 +01:00
parent 9614c6a3b3
commit 9f3c7d1ca8
1 changed files with 9 additions and 13 deletions

View File

@ -4,30 +4,26 @@
*
* Handles requests to the products/shipping_classes endpoint.
*
* @author WooThemes
* @category API
* @package WooCommerce/RestApi
* @since 3.0.0
*/
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
namespace WooCommerce\RestApi\Version4\Controllers;
defined( 'ABSPATH' ) || exit;
use \WC_REST_Terms_Controller;
/**
* REST API Product Shipping Classes controller class.
*
* @package WooCommerce/RestApi
* @extends WC_REST_Terms_Controller
*/
class WC_REST_Product_Shipping_Classes_V1_Controller extends WC_REST_Terms_Controller {
class ProductShippingClasses extends WC_REST_Terms_Controller {
/**
* Endpoint namespace.
*
* @var string
*/
protected $namespace = 'wc/v1';
protected $namespace = 'wc/v4';
/**
* Route base.
@ -46,8 +42,8 @@ class WC_REST_Product_Shipping_Classes_V1_Controller extends WC_REST_Terms_Contr
/**
* Prepare a single product shipping class output for response.
*
* @param obj $item Term object.
* @param WP_REST_Request $request
* @param obj $item Term object.
* @param WP_REST_Request $request Request params.
* @return WP_REST_Response $response
*/
public function prepare_item_for_response( $item, $request ) {