I'm using this plugin to customize order statuses in Woocommerce: Woocommerce Order Status Manager
In documentation it says I translate order status name using the following filter:
wc_order_status_manager_order_status_name
Indeed, in plugin source there are these lines:
public function get_name() {
/**
* Filter the name
*
* @since 1.3.0
* @param string $name The order status name
* @param string $slug The order status slug
*/
return apply_filters( 'wc_order_status_manager_order_status_name', $this->name, $this->slug );
}
In my theme's functions.php I added the following code:
function af_change_shipped_status_name($name, $slug){
if ('shipped' == $slug){
$name = __('Shipped', 'mythemetextdomain');
}
return $name;
}
add_filter( 'wc_order_status_manager_order_status_name', 'af_change_shipped_status_name', 10, 2 );
But it's not working.
Were am I wrong?