Fixed docblocks and removed dead variables

This commit is contained in:
Claudio Sanches 2017-02-16 18:05:06 -02:00
parent 70d46fe008
commit 7a52ec465b
4 changed files with 3 additions and 7 deletions

View File

@ -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 {

View File

@ -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 {

View File

@ -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();

View File

@ -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 {