woocommerce_ajax_order_item

woocommerce_ajax_order_item

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

See hook in core

Displaying hooks found in version: woocommerce.9.3.3

apply_filters('woocommerce_ajax_order_item') is found 1 times:

  • /includes/class-wc-ajax.php line 1073
    					/* 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 );