In Woocommerce, I am trying to map orders statuses with the following code:
function my_map_status ($status) {
if ($status == "wc-processing") {
return "WAA";
} else {
return $status;
}
if ($status == "wc-cancelled") {
return "WAC";
} else {
return $status;
}
}
But only the first one works.
How can I make it work for both?