Rename API base resource class
This commit is contained in:
parent
6c3eb169db
commit
23e6b22cfd
|
@ -13,7 +13,7 @@
|
|||
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
||||
|
||||
|
||||
class WC_API_Coupons extends WC_API_Base {
|
||||
class WC_API_Coupons extends WC_API_Resource {
|
||||
|
||||
/** @var string $base the route base */
|
||||
protected $base = '/coupons';
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
|
||||
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
||||
|
||||
class WC_API_Customers extends WC_API_Base {
|
||||
class WC_API_Customers extends WC_API_Resource {
|
||||
|
||||
/** @var string $base the route base */
|
||||
protected $base = '/customers';
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
|
||||
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
||||
|
||||
class WC_API_Orders extends WC_API_Base {
|
||||
class WC_API_Orders extends WC_API_Resource {
|
||||
|
||||
/** @var string $base the route base */
|
||||
protected $base = '/orders';
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
|
||||
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
||||
|
||||
class WC_API_Products extends WC_API_Base {
|
||||
class WC_API_Products extends WC_API_Resource {
|
||||
|
||||
/** @var string $base the route base */
|
||||
protected $base = '/products';
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
||||
|
||||
|
||||
class WC_API_Reports extends WC_API_Base {
|
||||
class WC_API_Reports extends WC_API_Resource {
|
||||
|
||||
/** @var string $base the route base */
|
||||
protected $base = '/reports';
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
/**
|
||||
* WooCommerce API Base class
|
||||
* WooCommerce API Resource class
|
||||
*
|
||||
* Provides shared functionality for resource-specific API classes
|
||||
*
|
||||
|
@ -12,7 +12,7 @@
|
|||
|
||||
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
||||
|
||||
class WC_API_Base {
|
||||
class WC_API_Resource {
|
||||
|
||||
/** @var WC_API_Server the API server */
|
||||
protected $server;
|
||||
|
@ -25,7 +25,7 @@ class WC_API_Base {
|
|||
*
|
||||
* @since 2.1
|
||||
* @param WC_API_Server $server
|
||||
* @return WC_API_Base
|
||||
* @return WC_API_Resource
|
||||
*/
|
||||
public function __construct( WC_API_Server $server ) {
|
||||
|
|
@ -150,7 +150,7 @@ class WC_API {
|
|||
include_once( 'api/class-wc-api-authentication.php' );
|
||||
$this->authentication = new WC_API_Authentication();
|
||||
|
||||
include_once( 'api/class-wc-api-base.php' );
|
||||
include_once( 'api/class-wc-api-resource.php' );
|
||||
include_once( 'api/class-wc-api-orders.php' );
|
||||
include_once( 'api/class-wc-api-products.php' );
|
||||
include_once( 'api/class-wc-api-coupons.php' );
|
||||
|
|
Loading…
Reference in New Issue