woocommerce_shipping_zone_method_status_toggled хук-событиеWC 1.0

Update if this method is enabled or not.

Использование

add_action( 'woocommerce_shipping_zone_method_status_toggled', 'wp_kama_woocommerce_shipping_zone_method_status_toggled_action', 10, 4 );

/**
 * Function for `woocommerce_shipping_zone_method_status_toggled` action-hook.
 * 
 * @param  $instance_id     
 * @param  $id              
 * @param  $request_zone_id 
 * @param  $request_enabled 
 *
 * @return void
 */
function wp_kama_woocommerce_shipping_zone_method_status_toggled_action( $instance_id, $id, $request_zone_id, $request_enabled ){

	// action...
}
$instance_id
-
$id
-
$request_zone_id
-
$request_enabled
-

Где вызывается хук

WC_REST_Shipping_Zone_Methods_V2_Controller::update_fields()
woocommerce_shipping_zone_method_status_toggled
WC_AJAX::shipping_zone_methods_save_changes()
woocommerce_shipping_zone_method_status_toggled
woocommerce/includes/rest-api/Controllers/Version2/class-wc-rest-shipping-zone-methods-v2-controller.php 329
do_action( 'woocommerce_shipping_zone_method_status_toggled', $instance_id, $method->id, $request['zone_id'], $request['enabled'] );
woocommerce/includes/class-wc-ajax.php 2890
do_action( 'woocommerce_shipping_zone_method_status_toggled', $instance_id, $method_id, $zone_id, $is_enabled );

Где используется хук в WooCommerce

Использование не найдено.