IF statement for custom fields
-
I’m trying to display payment terms based on a number in a custom field called pay_terms. Basically 100 means paid in full while any other number will be applied to the Net Days.
I know how to display but I can’t figure out how to use it in a conditional statement. I tried the code below but it doesn’t follow the conditional. The output of the code below looks like this: “100Payment Terms: Net Days”
$payterms = $wpo_wcpdf->custom_field('pay_terms'); if ($payterms == 100){ echo "Payment Terms: Full payment due prior to shipment."; }else {echo "Payment Terms: Net ".$payterms." Days"; }
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘IF statement for custom fields’ is closed to new replies.