Created
January 7, 2021 05:43
-
-
Save imanispatel/7a379df4ee75569062a02bf6d661dc29 to your computer and use it in GitHub Desktop.
Set invoice number when send invoice WC to Wave
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 | |
/** | |
* 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