woocommerce_rest_delete_product_attribute action-hookWC 1.0

Fires after a single attribute is deleted via the REST API.

Usage

add_action( 'woocommerce_rest_delete_product_attribute', 'wp_kama_woocommerce_rest_delete_product_attribute_action', 10, 3 );

/**
 * Function for `woocommerce_rest_delete_product_attribute` action-hook.
 * 
 * @param stdObject        $attribute The deleted attribute.
 * @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_product_attribute_action( $attribute, $response, $request ){

	// action...
}
$attribute(stdObject)
The deleted attribute.
$response(WP_REST_Response)
The response data.
$request(WP_REST_Request)
The request sent to the API.

Where the hook is called

WC_REST_Product_Attributes_V1_Controller::delete_item()
woocommerce_rest_delete_product_attribute
woocommerce/includes/rest-api/Controllers/Version1/class-wc-rest-product-attributes-v1-controller.php 413
do_action( 'woocommerce_rest_delete_product_attribute', $attribute, $response, $request );

Where the hook is used in WooCommerce

Usage not found.