Add “sub-total” to my-account/orders table
-
Hi guys, I am Trying to add the order subtotal in woocommerce my-account/orders table but I can’t seem to get it to display. Currently it adds the column and the label but its not displaying the orders sub total.Reason: i need a colum to display the order total before any coupon was applied. Anyone that can help please. I am currently using the code below :
add_filter( 'woocommerce_account_orders_columns', 'add_account_orders_column', 10, 1 ); function add_account_orders_column( $columns ){ $columns['item_subtotal_tax_excl'] = __( 'Sub-total', 'woocommerce' ); return $columns; } add_action( 'woocommerce_my_account_my_orders_column_custom-column', 'add_account_orders_column_rows' ); function add_account_orders_column_rows( $order ) { // Example with a custom field if ( $value = $order->get_meta( 'item_subtotal_tax_excl' ) ) { echo esc_html( $value ); } }
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Add “sub-total” to my-account/orders table’ is closed to new replies.