woocommerce_ajax_order_item

woocommerce_ajax_order_item

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

See hook in core

Displaying hooks found in version: woocommerce.8.7.0

apply_filters('woocommerce_ajax_order_item') is found 1 times:

  • /includes/class-wc-ajax.php line 1067
    					/* translators: %s: error message */
    					throw new Exception( sprintf( __( 'Error: %s', 'woocommerce' ), $validation_error->get_error_message() ) );
    				}
    				$item_id                 = $order->add_product( $product, $qty, array( 'order' => $order ) );
    				$item                    = apply_filters( 'woocommerce_ajax_order_item', $order->get_item( $item_id ), $item_id, $order, $product );
    				$added_items[ $item_id ] = $item;
    				$order_notes[ $item_id ] = $product->get_formatted_name();
    
    				// We do not perform any stock operations here because they will be handled when order is moved to a status where stock operations are applied (like processing, completed etc).
    
    				do_action( 'woocommerce_ajax_add_order_item_meta', $item_id, $item, $order );