Zach Feldman
09/07/2022, 4:43 PMelia
09/07/2022, 4:45 PMGiven Reed
09/07/2022, 4:57 PM# don't ship to military or po boxes
if ['AE','AA','AP','AF','AC','AM'].include? order.ship_address.state.abbr
return false
end
# don't ship to POBox
if order.ship_address.address1.match(/(^|(?:post(al)? *(?:office *)?|p[. ]*o\.? *))box *#? *\w+/ui)
return false
end
if order.ship_address.address2 && order.ship_address.address2.match(/(^|(?:post(al)? *(?:office *)?|p[. ]*o\.? *))box *#? *\w+/ui)
return false
end
Zach Feldman
09/07/2022, 5:04 PMbenmorganio
09/07/2022, 5:15 PMbenmorganio
09/07/2022, 5:16 PM