undefined method 'map' for nil

Tourist
6 0 1

new to ruby, how do i over come this?

my email is going bannans with error notices

it doesnt like line 1.. although the code seems to work

customer = Input.cart.shipping_address.address1
customer = customer.downcase

if customer.include? 'PO box' or customer.include? 'po' or customer.include? 'p.o.'
  puts customer.inspect
  Output.shipping_rates = Input.shipping_rates.delete_if do |shipping_rate|
    shipping_rate.name.upcase.start_with?("UPS")
  end

  Output.shipping_rates = Input.shipping_rates.delete_if do |shipping_rate|
    shipping_rate.name.start_with?("FedEx")
  end

end

 

1 Like
Highlighted
Tourist
6 0 1

Nada?

i have customers , they have carts, why is input cart shipping addrress nil?

 

 

0 Likes
Shopify Expert
685 0 68

Late to the game, but check this thread.

I'm a million different people
0 Likes
Tourist
6 0 1

the input = output was the answer for me as well.

 

But thank you!

0 Likes