Code Duplication    Length = 5-5 lines in 2 locations

includes/api/class-wc-rest-shipping-zone-methods-controller.php 1 location

@@ 199-203 (lines=5) @@
196
		$response = $this->prepare_item_for_response( $method, $request );
197
198
		// Actually delete
199
		if ( $force ) {
200
			$zone->delete_shipping_method( $instance_id ) ;
201
		} else {
202
			return new WP_Error( 'rest_trash_not_supported', __( 'Shipping methods do not support trashing.' ), array( 'status' => 501 ) );
203
		}
204
205
		/**
206
		 * Fires after a product review is deleted via the REST API.

includes/api/class-wc-rest-shipping-zones-controller.php 1 location

@@ 192-196 (lines=5) @@
189
190
		$response = $this->get_item( $request );
191
192
		if ( $force ) {
193
			$zone->delete();
194
		} else {
195
			return new WP_Error( 'rest_trash_not_supported', __( 'Shipping zones do not support trashing.' ), array( 'status' => 501 ) );
196
		}
197
198
		return $response;
199
	}