Skip to content

Instantly share code, notes, and snippets.

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/d51a0e61e1c9e1ef143f to your computer and use it in GitHub Desktop.
Save NiklasHogefjord/d51a0e61e1c9e1ef143f to your computer and use it in GitHub Desktop.
Specter for WooCommerce - Filter Internal Order Comment
/**
* Specter for WooCommerce
* Filter the Internal Order Comment sent to Specter.
* Useful when you want to pass extra order data that only should be visible in Specter for you as a merchant.
* Internal Order Comment is not visible on invoices and packing lists for the customer to see.
* The default value of the Internal comment is the WooCommerce Order number.
*
**/
add_filter('wc_specter_internal_comment', 'my_custom_internal_comment');
function my_custom_internal_comment( $internal_comment ) {
$new_internal_comment = $internal_comment . ' <br/>My custom internal comment';
return $new_internal_comment;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment