woocommerce_rest_delete_shipping_zone_method
Fires after a shipping zone is deleted via the REST API.
Использование
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.
Список изменений
С версии 9.1.0 | Введена. |
Где вызывается хук
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 );