Fixed docblocks and removed dead variables
This commit is contained in:
parent
70d46fe008
commit
7a52ec465b
|
@ -18,7 +18,7 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|||
* REST API Order Refunds controller class.
|
||||
*
|
||||
* @package WooCommerce/API
|
||||
* @extends WC_REST_Posts_Controller
|
||||
* @extends WC_REST_Orders_Controller
|
||||
*/
|
||||
class WC_REST_Order_Refunds_Controller extends WC_REST_Orders_Controller {
|
||||
|
||||
|
|
|
@ -18,7 +18,7 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|||
* REST API Webhooks controller class.
|
||||
*
|
||||
* @package WooCommerce/API
|
||||
* @extends WC_REST_Posts_Controller
|
||||
* @extends WC_REST_Webhooks_V1_Controller
|
||||
*/
|
||||
class WC_REST_Webhooks_Controller extends WC_REST_Webhooks_V1_Controller {
|
||||
|
||||
|
|
|
@ -131,8 +131,6 @@ class WC_REST_Coupons_V1_Controller extends WC_REST_Posts_Controller {
|
|||
* @return array
|
||||
*/
|
||||
public function query_args( $args, $request ) {
|
||||
global $wpdb;
|
||||
|
||||
if ( ! empty( $request['code'] ) ) {
|
||||
$id = wc_get_coupon_id_by_code( $request['code'] );
|
||||
$args['post__in'] = array( $id );
|
||||
|
@ -232,8 +230,6 @@ class WC_REST_Coupons_V1_Controller extends WC_REST_Posts_Controller {
|
|||
* @return WP_Error|stdClass $data Post object.
|
||||
*/
|
||||
protected function prepare_item_for_database( $request ) {
|
||||
global $wpdb;
|
||||
|
||||
$id = isset( $request['id'] ) ? absint( $request['id'] ) : 0;
|
||||
$coupon = new WC_Coupon( $id );
|
||||
$schema = $this->get_item_schema();
|
||||
|
|
|
@ -18,7 +18,7 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|||
* REST API Order Refunds controller class.
|
||||
*
|
||||
* @package WooCommerce/API
|
||||
* @extends WC_REST_Posts_Controller
|
||||
* @extends WC_REST_Orders_V1_Controller
|
||||
*/
|
||||
class WC_REST_Order_Refunds_V1_Controller extends WC_REST_Orders_V1_Controller {
|
||||
|
||||
|
|
Loading…
Reference in New Issue