Alert: This function’s access is marked private. This means it is not intended for use by plugin or theme developers, only in other core functions. It is listed here for completeness.
WC_AJAX::maybe_add_order_item( int $order_id, string|array $items, array $items_to_add )
Add order item via AJAX. This is refactored for better unit testing.
Description Description
Parameters Parameters
- $order_id
-
(Required) ID of order to add items to.
- $items
-
(Required) Existing items in order. Empty string if no items to add.
- $items_to_add
-
(Required) Array of items to add.
Return Return
(array) Fragments to render and notes HTML.
Source Source
File: includes/class-wc-ajax.php