Last active
May 27, 2021 17:10
-
-
Save zorem/abdd42a23fcdf6c69861e1e9d436de74 to your computer and use it in GitHub Desktop.
Renaming WooCommerce Order Status
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
<?php | |
add_filter( 'wc_order_statuses', 'wc_renaming_order_status' ); | |
/* | |
* Rename WooCommerce Order Status | |
*/ | |
function wc_renaming_order_status( $order_statuses ) { | |
foreach ( $order_statuses as $key => $status ) { | |
$new_order_statuses[ $key ] = $status; | |
if ( 'wc-partial-shipped' === $key ) { | |
$order_statuses['wc-partial-shipped'] = esc_html__( 'Packed','text-domain' ); | |
} | |
} | |
return $order_statuses; | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment