• Resolved gluehbirne

    (@gluehbirne)


    Hi there,

    i need to customize the output of ‘woocommerce_view_order’. So i need to delete the woocommerce-shipments-list__title & woocommerce-shipments-table.

    How is that possible?

    Thanks in advance.

Viewing 3 replies - 1 through 3 (of 3 total)
  • To customize the output of woocommerce_view_order and remove the woocommerce-shipments-list__title and woocommerce-shipments-table sections, you can use the woocommerce_order_details_after_order_table action hook to modify the template. Here’s an example of how you can achieve this:

    add_action( 'woocommerce_order_details_after_order_table', 'ahirwp_custom_order_details_after_order_table' );
    function ahirwp_custom_order_details_after_order_table( $order ) {
        // Remove the shipments title and table
        remove_action( 'woocommerce_view_order', 'woocommerce_order_details_shipment_title', 10 );
        remove_action( 'woocommerce_view_order', 'woocommerce_order_details_shipment_items', 20 );
    }
    Thread Starter gluehbirne

    (@gluehbirne)

    Hi @hemant-ahir ,

    thanks for your reply. unfortunately it has no effect. i copied it into the functions.php of my child theme.

    Sorry to hear that. If you require some assistance with customization but you’re not comfortable doing it yourself, you may want to contact the folks at Codeable.io

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘customizing woocommerce_view_order’ is closed to new replies.