woocommerce_add_order_item
The WooCommerce woocommerce add order item function.
Description
Parameters (2)
- 0. $order_id
- The order id.
- 1. $item
- The item.
Usage
if ( !function_exists( 'woocommerce_add_order_item' ) ) { require_once ABSPATH . PLUGINDIR . 'woocommerce/includes/wc-deprecated-functions.php'; } // The order id. $order_id = null; // The item. $item = null; // NOTICE! Understand what this does before running. $result = woocommerce_add_order_item($order_id, $item);
Defined (1)
The function is defined in the following location(s).
- /includes/wc-deprecated-functions.php
- function woocommerce_add_order_item( $order_id, $item ) {
- wc_deprecated_function( __FUNCTION__, '3.0', 'wc_add_order_item' );
- return wc_add_order_item( $order_id, $item );
- }