Skip to content

Instantly share code, notes, and snippets.

@jorpdesigns
Created July 15, 2021 14:39
Show Gist options
  • Save jorpdesigns/06c4ebbc517b0943266fc34af9f44c38 to your computer and use it in GitHub Desktop.
Save jorpdesigns/06c4ebbc517b0943266fc34af9f44c38 to your computer and use it in GitHub Desktop.
Snippet to hide (incl. tax) suffix in WooCommerce order display
<?php
add_filter( 'woocommerce_get_order_item_totals', 'wc_get_order_item_totals', 10, 3 );
function wc_get_order_item_totals( $total_rows, $order, $tax_display ) {
$total_rows['order_total'] = array(
'label' => __( 'Total:', 'woocommerce' ),
'value' => $order->get_formatted_order_total(),
);
return $total_rows;
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment