This function runs during save.  It runs for each item.  So, with core WPIM only, it runs after each reservation because only one item can be reserved at a time with just core.  If you have Reserve Cart, then this runs for each item in the cart.

function my_custom_function($inventory_id, $quantity, $original_quantity) {
   $inventory_id; // Item id
   $quantity; // Quantity reserved
   $original_quantity; // The quantity the item had at the time of the reserve (not including the reduction)

   // Get the item information

   $item_info = new WPIMItem();  // Call new instance of WPIMItem class
   $item_info = $item_info->get( $inventory_id );  // Get the item information with inventory id
   $name = $item_info->inventory_name;  // Example of how you would get the name of an item

    // Do whatever you want from here!

}

add_action('wpim_save_reserve', 'my_custom_function', 10, 3);

Reviews on WordPress.org

Trusted by thousands of businesses

★★★★★

"Created an online museum for my club. Really impressive plugin. Support was responsive and helpful."

@hackrepair

★★★★★

"Excellent, clean, simple inventory management. Well structured code — use it right away or customize it to your liking."

@techlocally

★★★★★

"We purchased the entire suite. Installation was easy, small issues were fixed immediately, and the guidance during setup was invaluable."

@design4dotcom

★★★★★

"Plugin support was helpful and rapid. Highest mark."

@drgar

★★★★★

"Great support. Very thorough when looking for a solution, and upfront with exactly how to fix it or institute a workaround."

@shoidahl

★★★★★

"I used this plugin and eventually hired the developers for all my WordPress work. Responsive, competent, and clean code. Would recommend to anyone."

@justenhong