Created
March 28, 2023 16:22
-
-
Save PechenkiUA/1c6d53b652c530e6a5db935b7a29a471 to your computer and use it in GitHub Desktop.
Telsender WC status name
This file contains 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 | |
/** | |
* Telsender WC status name | |
* @param $list | |
* @param $order_id | |
* @return mixed | |
*/ | |
function telsender_status_translate($list, $order_id){ | |
$order = wc_get_order( $order_id ); | |
$status = $order->get_status(); | |
$status_name = wc_get_order_status_name( $status ); | |
$list['{status_translate}'] = $status_name; | |
return $list; | |
} | |
add_filter('tscf_filter_codetemplate', 'telsender_status_translate', 20, 2); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment