Skip to content

Instantly share code, notes, and snippets.

@grantalltodavid
Created October 13, 2017 10:21
Show Gist options
  • Save grantalltodavid/fff38b87f333eaf68713390543d94d73 to your computer and use it in GitHub Desktop.
Save grantalltodavid/fff38b87f333eaf68713390543d94d73 to your computer and use it in GitHub Desktop.
Sliced Invoices: remove rate field from showing
add_filter( 'sliced_invoice_line_items_output', 'sliced_invoice_line_items_output_20171013' );
function sliced_invoice_line_items_output_20171013( $output ) {
// remove rate field from showing
$regex = array(
'#<th class="rate">(.*?)</th>#',
'#<td class="rate">(.*?)</td>#'
);
$output = preg_replace( $regex, '', $output );
return $output;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment