Answer the question
In order to leave comments, you need to log in
How to pass a variable to $_POST?
$custom_checkout_fields = [
'order_comment',
'delivery_method'
];
foreach ($custom_checkout_fields as $field) {
if ( ! empty( $_POST[$field] ) ) {
echo "wow";
}
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question