this will definitely be in the ot_coupon.php and more specifically in the collect_posts function.
based on your code something like this may work:
PHP Code:
$po_box_address = false;
if ( preg_match('/PO BOX/si', $order->delivery['street_address'])) {
$po_box_address = true;
} else if ( preg_match('/POBOX/si', $order->delivery['street_address'])) {
$po_box_address = true;
} else if ( preg_match('/P\.O\./si', $order->delivery['street_address'])) {
$po_box_address = true;
} else if ( preg_match('/P\.O/si', $order->delivery['street_address'])) {
$po_box_address = true;
} else if ( preg_match('/PO\./si', $order->delivery['street_address'])) {
$po_box_address = true;
}
if ($po_box_address) {
$messageStack->add_session('redemptions', PO_BOX_WARNING, 'caution');
$this->clear_posts();
zen_redirect(zen_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL',true, false));
}
no guarantees.... also i would separate out the check PO box into a separate function and then call that function from both places. in my experience, PO BOX customers will do anything to get around the restrictions associated with their address. better to maintain the code in one place than in two.
good luck!