Skip to content

Instantly share code, notes, and snippets.

@seostudio
Last active January 19, 2018 17:10
Show Gist options
  • Save seostudio/7eddef1f8292925cca7aaadc90ac4588 to your computer and use it in GitHub Desktop.
Save seostudio/7eddef1f8292925cca7aaadc90ac4588 to your computer and use it in GitHub Desktop.
Prefix in woocommerce order number
add_filter( 'woocommerce_order_number', 'wpdesk_woocommerce_order_number_prefix_suffix', 20 );
function wpdesk_woocommerce_order_number_prefix_suffix( $order_id ) {
$prefix = 'X/';
$suffix = '/Y';
$new_order_id = $prefix . $order_id . $suffix;
return $new_order_id;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment