Skip to content

Instantly share code, notes, and snippets.

@Musilda
Created August 7, 2019 19:22
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 Musilda/fe0aa22d2bc7d3f6606ab833b9cfe6ca to your computer and use it in GitHub Desktop.
Save Musilda/fe0aa22d2bc7d3f6606ab833b9cfe6ca to your computer and use it in GitHub Desktop.
<?php
$data['OrderNumber'] = apply_filters( 'idoklad_order_number', $order_id );
add_filter( 'idoklad_order_number', 'toret_change_idoklad_order_number', 10, 1 );
function toret_change_idoklad_order_number( $order_id ){
$order = wc_get_order( $order_id );
return $order->get_order_number();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment