Skip to content

Instantly share code, notes, and snippets.

@imanispatel
Created June 21, 2021 06:13
Show Gist options
  • Save imanispatel/cf2e75c29f44db1f600fd960c8df692d to your computer and use it in GitHub Desktop.
Save imanispatel/cf2e75c29f44db1f600fd960c8df692d to your computer and use it in GitHub Desktop.
Wave Connector: Remove taxes while send invoices
<?php
/**
* Remove Taxes from order
*
* @param array $variables get variables.
* @param int $order_id get order id.
* @return array
*/
function wave_order_variable( $variables, $order_id ) {
$items = array();
foreach( $variables['input']['items'] as $item ) {
$item['taxes'] = array();
$items[] = $item;
}
$variables['input']['items'] = $items;
return $variables;
}
add_filter( 'venus_wc_export_invoice_variables', 'wave_order_variable', 10, 2 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment