Skip to content

Instantly share code, notes, and snippets.

@imanispatel
Created January 7, 2021 05:43
Show Gist options
  • Save imanispatel/7a379df4ee75569062a02bf6d661dc29 to your computer and use it in GitHub Desktop.
Save imanispatel/7a379df4ee75569062a02bf6d661dc29 to your computer and use it in GitHub Desktop.
Set invoice number when send invoice WC to Wave
<?php
/**
* Set Invoice number as order id
*
* @param array $variables get variables.
* @param int $order_id get order id.
* @return array
*/
function wave_order_variable( $variables, $order_id ) {
$variables['input']['invoiceNumber'] = "$order_id";
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