wcdn_remove_semicolon_from_totals

Remove the semicolon from the output.

Description

wcdn_remove_semicolon_from_totals( (number) $total_rows, $order ); 

Parameters (2)

0. $total_rows (number)
The total rows.
1. $order
The order.

Usage

  1. if ( !function_exists( 'wcdn_remove_semicolon_from_totals' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'woocommerce-print-invoice-delivery-note/includes/wcdn-template-functions.php'; 
  3.  
  4. // The total rows. 
  5. $total_rows = null; 
  6.  
  7. // The order. 
  8. $order = null; 
  9.  
  10. // NOTICE! Understand what this does before running. 
  11. $result = wcdn_remove_semicolon_from_totals($total_rows, $order); 
  12.  

Defined (1)

The function is defined in the following location(s).

/includes/wcdn-template-functions.php  
  1. function wcdn_remove_semicolon_from_totals( $total_rows, $order ) {  
  2. foreach( $total_rows as $key => $row ) { 
  3. $label = $row['label']; 
  4. $colon = strrpos( $label, ':' ); 
  5. if( $colon !== false ) { 
  6. $label = substr_replace( $label, '', $colon, 1 ); 
  7. }  
  8. $total_rows[$key]['label'] = $label; 
  9. return $total_rows;