woocommerce_before_save_order_item

woocommerce_before_save_order_item

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: action

See hook in core

Displaying hooks found in version: woocommerce.9.8.1

do_action('woocommerce_before_save_order_item') is found 1 times:

  • /includes/admin/wc-admin-functions.php line 380
    376
    377
    378
    379
    380
    381
    382
    383
    384
    385
    386
    }
     
    // Allow other plugins to change item object before it is saved.
    /* phpcs:disable WooCommerce.Commenting.CommentHooks.MissingHookComment */
    do_action( 'woocommerce_before_save_order_item', $item );
    /* phpcs: enable */
     
    $item->save();
     
    if ( in_array( $order->get_status(), array( OrderStatus::PROCESSING, OrderStatus::COMPLETED, OrderStatus::ON_HOLD ), true ) ) {
        $changed_stock = wc_maybe_adjust_line_item_product_stock( $item );