Skip to content

Instantly share code, notes, and snippets.

@NiklasHogefjord
Last active August 29, 2015 14:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save NiklasHogefjord/b779c6bbc629632b9160 to your computer and use it in GitHub Desktop.
Save NiklasHogefjord/b779c6bbc629632b9160 to your computer and use it in GitHub Desktop.
Specter for WooCommerce - Filter Customer Order Reference
/**
* Specter for WooCommerce
* Filter the Customer Order Reference sent to Specter.
* Useful when you want to pass extra order data that should be visible on the invoice or packing list sent to the customer.
* The default value of the Internal comment is the WooCommerce Order number.
*
**/
add_filter('wc_specter_order_reference', 'my_custom_order_reference');
function my_custom_order_reference( $orderref ) {
$new_orderref = $orderref . ' <br/>My custom data';
return $new_orderref;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment