function and if check in php
-
Hello guys,
I tried to make a function that changes what is written in a variable.
See code:function wc_change_billing_country( $order ) { if ($order->billing_country = 'DE'){ $order->billing_country = "Germany"; return $order->billing_country; } if ($order->billing_country = 'CH'){ $order->billing_country = "Hurliburli"; return $order->billing_country; } if ($order->billing_country = 'A'){ $order->billing_country = "Austria"; return $order->billing_country; } }
but this function seems to always return the first if case (DE)
what did I do wrong in the code?
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘function and if check in php’ is closed to new replies.