Help with PhP Logic Code
-
Hello,
I have an issue with a piece of code that just will not work. The code is supposed to add an ‘s’ at the end of an SKU number before transmitting to shipstation. When I use a single condition it works great. When I add ‘or’ then it does not work at all. Can I get some help with that? Here is the code:
if ( $product && $product->needs_shipping() ) { if (in_array('WD' or 'Master Distributor' or 'WD Credit Card', $prodcats)) { $this->xml_append( $item_xml, 'SKU', $product->get_title() ); $this->xml_append( $item_xml, 'Name', $product->get_description() ); } else { $this->xml_append( $item_xml, 'SKU', $product->get_title().'s' ); $this->xml_append( $item_xml, 'Name', $product->get_description().'s' ); }Thank you!
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
The topic ‘Help with PhP Logic Code’ is closed to new replies.