Add action `woocommerce_rest_delete_shipping_zone_method` (#47862)
Add action `woocommerce_rest_delete_shipping_zone_method` and remove inappropriate product review action.
This commit is contained in:
parent
0fdc4ddd7c
commit
8f7a9ced04
|
@ -0,0 +1,4 @@
|
|||
Significance: patch
|
||||
Type: fix
|
||||
|
||||
Adds new hook `woocommerce_rest_delete_shipping_zone_method` which will fire after a shipping zone method is deleted via the REST API.
|
|
@ -231,13 +231,16 @@ class WC_REST_Shipping_Zone_Methods_V2_Controller extends WC_REST_Shipping_Zones
|
|||
}
|
||||
|
||||
/**
|
||||
* Fires after a product review is deleted via the REST API.
|
||||
* Fires after a shipping zone is deleted via the REST API.
|
||||
*
|
||||
* @param object $method
|
||||
* @param WP_REST_Response $response The response data.
|
||||
* @param WP_REST_Request $request The request sent to the API.
|
||||
* @since 9.1.0
|
||||
*
|
||||
* @param WC_Shipping_Method $method The shipping zone method being deleted.
|
||||
* @param WC_Shipping_Zone $zone The shipping zone the method belonged to.
|
||||
* @param WP_REST_Response $response The response data.
|
||||
* @param WP_REST_Request $request The request sent to the API.
|
||||
*/
|
||||
do_action( 'rest_delete_product_review', $method, $response, $request );
|
||||
do_action( 'woocommerce_rest_delete_shipping_zone_method', $method, $zone, $response, $request );
|
||||
|
||||
return $response;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue