Created
January 17, 2020 17:25
-
-
Save BigWhale/28d8e7f8df7abb97ab5c45d16435cc92 to your computer and use it in GitHub Desktop.
Woocommerce - modify order number
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_filter( 'woocommerce_order_number', 'arglebargle_set_order_prefix' ); | |
function arglebargle_set_order_prefix( $order_id ) { | |
switch ( get_locale() ) { | |
case 'hr': | |
$prefix = 'HR-'; | |
break; | |
default: | |
$prefix = 'SI-'; | |
break; | |
} | |
return ($prefix . $order_id); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment