mercredi 12 septembre 2018

Mapping code for order status in woocommerce

You may can help me with a piece of code? I want map those 2 order status .. but anyhow only the first is working.

function my_map_status ($status) {
    if ($status == "wc-processing") {
        return "WAA";
    } else {
        return $status;
    }
    if ($status == "wc-cancelled") {
        return "WAC";
    } else {
        return $status;
    }
}

Aucun commentaire:

Enregistrer un commentaire