• Resolved rafaelmiura

    (@rafaelmiura)


    Hi,
    I am trying to reverse the order the products are displayed on the cart page, checkout page, order received page and notification emails

    I managed to change the cart and checkout page, but couldn’t figure out the hooks to apply for the order received page and emails. Would you be able to point me to what hooks I should target to achieve this?

    For the order received page, I could change the code of the order detail template file to the following, but if I can use a hook would be much better:

    $order_items = array_reverse($order->get_items( apply_filters( ‘woocommerce_purchase_order_item_types’, ‘line_item’ ) ));

    Thanks in advance.

Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Reverse order of $order_items’ is closed to new replies.