• Hello everyone,

    I hope this message finds you well. I recently encountered a challenge while working on my WooCommerce store, and I was able to find a solution through a thread on this forum. However, I’ve encountered a new issue related to fixed pricing for bundled products, and I’m seeking some guidance.

    Initially, my goal was to display only bundled products, excluding the main products, on the order details page. I found a helpful code snippet provided by a forum member (@miemie) which worked perfectly for my requirement. Here’s the code:

    add_filter( ‘woocommerce_order_get_items’, ‘woosb_exclude_bundles_from_order’, 10, 1 );
    function woosb_exclude_bundles_from_order( $items ) {
    foreach ( $items as $key => $item ) {
    if ( $item->meta_exists( ‘_woosb_ids’ ) ) {
    unset( $items[ $key ] );
    }
    }
    return $items;
    }

    I’m grateful that this solution resolved my initial issue and allowed me to show only bundled products in the order details.

    However, I’ve encountered a new challenge. For bundled products with fixed pricing, the displayed price on the order details page isn’t reflecting the correct value. You can see an example in this screenshot: Screenshot Link.

    As you can see, the first item’s price is not showing correctly. This item was configured with a fixed price of $26.25, and a discount of $4 was applied. This should result in a unit price of approximately $1.633333333333333, but the displayed price doesn’t match.

    I would greatly appreciate any insights or suggestions you might have regarding this issue. Your expertise would be of immense help in ensuring that my order details accurately reflect the pricing of bundled products, especially those with fixed pricing.

    Thank you all for your time and assistance.

  • The topic ‘Need Help with Displaying Bundled Products and Fixed Pricing in Order Details’ is closed to new replies.