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 |
|
} |
includes/api/class-wc-rest-shipping-zone-methods-controller.php 1 location
|
@@ 206-210 (lines=5) @@
|
203 |
|
$response = $this->prepare_item_for_response( $method, $request ); |
204 |
|
|
205 |
|
// Actually delete |
206 |
|
if ( $force ) { |
207 |
|
$zone->delete_shipping_method( $instance_id ); |
208 |
|
} else { |
209 |
|
return new WP_Error( 'rest_trash_not_supported', __( 'Shipping methods do not support trashing.' ), array( 'status' => 501 ) ); |
210 |
|
} |
211 |
|
|
212 |
|
/** |
213 |
|
* Fires after a product review is deleted via the REST API. |