Created
June 21, 2021 06:13
-
-
Save imanispatel/cf2e75c29f44db1f600fd960c8df692d to your computer and use it in GitHub Desktop.
Wave Connector: Remove taxes while send invoices
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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