Skip to content

Instantly share code, notes, and snippets.

@webtoffee-git
Created May 27, 2024 12:11
Show Gist options
  • Save webtoffee-git/0498e7091dfaaf2ee662884c18f375a0 to your computer and use it in GitHub Desktop.
Save webtoffee-git/0498e7091dfaaf2ee662884c18f375a0 to your computer and use it in GitHub Desktop.
Display order Id and order number together on the WooCommerce orders page - By WebToffee (Sequential order number for WooCommerce )
<?php //Do not copy this line of code
add_filter('wt_alter_sequence_number', 'wtsn_alter_order_number_formate',10,2);
if(!function_exists('wtsn_alter_order_number_formate')){
function wtsn_alter_order_number_formate($sequential_order_number,$order_id){
if($sequential_order_number){
return 'order number:' . $sequential_order_number . ' order id:' .$order_id;
}else{
return $order_id;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment