lib/spree/shipping_labels.rb
def po_box?
    # Original implementation. Still allow it to be manually set
    (@address_type == 'po_box') ||
    (1..3).any? { |i| public_send("address#{i}") =~ PO_REGEXP }
  end
# Override to try to automatically detect if an address is a P.O. Box
Override to try to automatically detect if an address is a P.O. Box
Override to try to automatically detect if an address is a P . O . Box
def po_box?
    (@address_type == 'po_box') ||
    (1..3).any? { |i| public_send("address#{i}") =~ PO_REGEXP }
  end
def po_box? ( @address_type == 'po_box' ) || ( 1 .. 3 ) . any? { | i | public_send ( "address#{i}" ) =~ PO_REGEXP } end
Override to try to automatically detect if an address is a P.O.
Override to try to automatically detect if an address is a P . O .
# Original implementation. Still allow it to be manually set