woocommerce_rest_delete_shipping_zone_method
Fires after a shipping zone method is deleted via the REST API.
Usage
add_action( 'woocommerce_rest_delete_shipping_zone_method', 'wp_kama_woocommerce_rest_delete_shipping_zone_method_action', 10, 4 );
/**
* Function for `woocommerce_rest_delete_shipping_zone_method` action-hook.
*
* @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.
*
* @return void
*/
function wp_kama_woocommerce_rest_delete_shipping_zone_method_action( $method, $zone, $response, $request ){
// action...
}
- $method(WC_Shipping_Method)
- The shipping zone method being deleted.
- $zone(WC_Shipping_Zone)
- The shipping zone the method belonged to.
- $response(WP_REST_Response)
- The response data.
- $request(WP_REST_Request)
- The request sent to the API.
Changelog
| Since 10.5.0 | Introduced. |
Where the hook is called
woocommerce_rest_delete_shipping_zone_method
woocommerce/src/Internal/RestApi/Routes/V4/ShippingZoneMethod/Controller.php 282
do_action( 'woocommerce_rest_delete_shipping_zone_method', $method, $zone, $response, $request );
woocommerce/includes/rest-api/Controllers/Version2/class-wc-rest-shipping-zone-methods-v2-controller.php 247
do_action( 'woocommerce_rest_delete_shipping_zone_method', $method, $zone, $response, $request );