mirror of
https://github.com/pronamic/woocommerce-subscriptions.git
synced 2025-10-10 11:32:54 +00:00
2.1.0
This commit is contained in:

committed by
Remco Tolsma

parent
82336a2bd8
commit
153a2cd7ed
36
includes/api/class-wc-rest-subscription-notes-controller.php
Normal file
36
includes/api/class-wc-rest-subscription-notes-controller.php
Normal file
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
/**
|
||||
* REST API subscription notes controller
|
||||
*
|
||||
* Handles requests to the /subscription/<id>/notes endpoint.
|
||||
*
|
||||
* @author Prospress
|
||||
* @since 2.1
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit;
|
||||
}
|
||||
/**
|
||||
* REST API Subscription Notes controller class.
|
||||
*
|
||||
* @package WooCommerce_Subscriptions/API
|
||||
* @extends WC_REST_Order_Notes_Controller
|
||||
*/
|
||||
class WC_REST_Subscription_Notes_Controller extends WC_REST_Order_Notes_Controller {
|
||||
|
||||
/**
|
||||
* Route base.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $rest_base = 'subscriptions/(?P<order_id>[\d]+)/notes';
|
||||
|
||||
/**
|
||||
* Post type.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $post_type = 'shop_subscription';
|
||||
|
||||
}
|
Reference in New Issue
Block a user