woocommerce_new_order_item

woocommerce_new_order_item

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: action
See hook in action

See hook in core

Displaying hooks found in version: woocommerce.9.4.2

do_action('woocommerce_new_order_item') is found 2 times:

  • /includes/data-stores/abstract-wc-order-item-type-data-store.php line 60
    		$item->save_meta_data();
    		$item->apply_changes();
    		$this->clear_cache( $item );
    
    		do_action( 'woocommerce_new_order_item', $item->get_id(), $item, $item->get_order_id() );
    	}
    
    	/**
    	 * Update a order item in the database.
    	 *
    	 * @since 3.0.0
    
  • /includes/wc-order-item-functions.php line 39
    	$data_store = WC_Data_Store::load( 'order-item' );
    	$item_id    = $data_store->add_order_item( $order_id, $item_array );
    	$item       = WC_Order_Factory::get_order_item( $item_id );
    
    	do_action( 'woocommerce_new_order_item', $item_id, $item, $order_id );
    
    	return $item_id;
    }
    
    /**
     * Update an item for an order.
    

See this hook used in plugins: