woocommerce_rest_insert_{$taxonomy}

woocommerce_rest_insert_{$taxonomy}

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: action

See hook in core

Displaying hooks found in version: woocommerce.9.5.1

do_action('woocommerce_rest_insert_{$taxonomy}') is found 2 times:

  • /includes/rest-api/Controllers/Version3/class-wc-rest-terms-controller.php line 440
    		 * @param WP_Term         $term      Inserted Term object.
    		 * @param WP_REST_Request $request   Request object.
    		 * @param boolean         $creating  True when creating term, false when updating.
    		 */
    		do_action( "woocommerce_rest_insert_{$taxonomy}", $term, $request, true );
    
    		$request->set_param( 'context', 'edit' );
    		$response = $this->prepare_item_for_response( $term, $request );
    		$response = rest_ensure_response( $response );
    		$response->set_status( 201 );
    
    
  • /includes/rest-api/Controllers/Version3/class-wc-rest-terms-controller.php line 529
    		 * @param WP_Term         $term      Inserted Term object.
    		 * @param WP_REST_Request $request   Request object.
    		 * @param boolean         $creating  True when creating term, false when updating.
    		 */
    		do_action( "woocommerce_rest_insert_{$taxonomy}", $term, $request, false );
    
    		$request->set_param( 'context', 'edit' );
    		$response = $this->prepare_item_for_response( $term, $request );
    		return rest_ensure_response( $response );
    	}