woocommerce_rest_delete_shipping_zone_method action-hookWC 9.1.0

Fires after a shipping zone 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 9.1.0 Introduced.

Where the hook is called

WC_REST_Shipping_Zone_Methods_V2_Controller::delete_item()
woocommerce_rest_delete_shipping_zone_method
woocommerce/includes/rest-api/Controllers/Version2/class-wc-rest-shipping-zone-methods-v2-controller.php 243
do_action( 'woocommerce_rest_delete_shipping_zone_method', $method, $zone, $response, $request );

Where the hook is used in WooCommerce

Usage not found.