woocommerce_rest_delete_product_attribute
Fires after a single attribute is deleted via the REST API.
Использование
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.
Где вызывается хук
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 );