woocommerce_rest_insert_product_attribute action-hook . WC 1.0
Fires after a single product attribute is created or updated via the REST API.
Usage
add_action( 'woocommerce_rest_insert_product_attribute', 'action_function_name_3093', 10, 3 ); function action_function_name_3093( $attribute, $request, $creating ){ // action... }
- $attribute(stdObject)
- Inserted attribute object.
- $request(WP_REST_Request)
- Request object.
- $creating(true|false)
- True when creating attribute, false when updating.
Where the hook is called
woocommerce_rest_insert_product_attribute
woocommerce_rest_insert_product_attribute
woocommerce/includes/rest-api/Controllers/Version1/class-wc-rest-product-attributes-v1-controller.php 299
do_action( 'woocommerce_rest_insert_product_attribute', $attribute, $request, true );
woocommerce/includes/rest-api/Controllers/Version1/class-wc-rest-product-attributes-v1-controller.php 369
do_action( 'woocommerce_rest_insert_product_attribute', $attribute, $request, false );