Skip to content

Instantly share code, notes, and snippets.

@grantalltodavid
Created October 27, 2017 00:51
Show Gist options
  • Save grantalltodavid/ffb1fb3dc68265dda3065d83131c6b9f to your computer and use it in GitHub Desktop.
Save grantalltodavid/ffb1fb3dc68265dda3065d83131c6b9f to your computer and use it in GitHub Desktop.
Sliced Invoices: hide "adjust (%)" field from admin quote/invoice pages
add_action( 'sliced_after_line_items', 'sliced_admin_hide_the_adjust_field', 10, 2 );
function sliced_admin_hide_the_adjust_field( $line_items_group_id, $line_items ) {
// for historical reasons the "adjust(%)" field is called "tax" internally,
// although it is no longer used for this purpose.
return $line_items->remove_field( 'tax', $line_items_group_id );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment