woocommerce_checkout_create_order_line_item_object

woocommerce_checkout_create_order_line_item_object

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: filter

See hook in core

Displaying hooks found in version: woocommerce.9.8.1

apply_filters('woocommerce_checkout_create_order_line_item_object') is found 1 times:

  • /includes/class-wc-checkout.php line 537
    533
    534
    535
    536
    537
    538
    539
    540
    541
    542
    543
    * Filter hook to get initial item object.
     *
     * @since 3.1.0
     */
    $item                       = apply_filters( 'woocommerce_checkout_create_order_line_item_object', new WC_Order_Item_Product(), $cart_item_key, $values, $order );
    $product                    = $values['data'];
    $item->legacy_values        = $values; // @deprecated 4.4.0 For legacy actions.
    $item->legacy_cart_item_key = $cart_item_key; // @deprecated 4.4.0 For legacy actions.
    $item->set_props(
        array(
            'quantity'     => $values['quantity'],