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 );
}
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