• Resolved miquec88

    (@miquec88)


    Hi,
    I installed the plugin and I configured the gift article.
    When you try to checkout the order with only the gift article and you choose to pay with paypal you can’t insert the paypal credentials … appears the paypal button “come back to the site”, I see the url:

    ….checkout/error/invalidAddressError?data=purchase_units%5B0%5D.item_list.shipping_address.country_code,purchase_units%5B0%5D.item_list.shipping_address.country_code&data=purchase_units%5B0%5D.item_list.shipping_address.country_code,purchase_units%5B0%5D.item_list.shipping_address.country_code&code=ADDRESS_ERROR

    It seems that paypal want an address but the plugin remove it.

    How can I “fix” it?
    Thank you

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author pimwick

    (@pimwick)

    WooCommerce offers the option to mark a product as Virtual which means it won’t be shipped and thus does not need a shipping address.

    If you are getting an error then you have a theme or another plugin which is not checking the Virtual flag. Ideally you would locate the source of the issue and have the developer check for the Virtual flag, however it is possible to force the Shipping information even for Virtual products.

    To force WooCommerce to require a shipping address for every order by following these steps:

    1. Download the functions.php from your FTP server at /wp-content/themes/<your theme>/functions.php
    2. Keep a backup of functions.php in case there are problems.
    3. Edit functions.php and scroll to the very end and add this code.

    Note: if the last line is “?>” then put this code *above* that line. Otherwise, this code goes at the very end of the file:

    add_filter( 'woocommerce_cart_needs_shipping_address', '__return_true', 50 );

    4. Save the functions.php file and re-upload it to your server.

    If you have any problems, replace functions.php with your backup file.

    Thread Starter miquec88

    (@miquec88)

    It works!
    Thank you!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Paypal address error’ is closed to new replies.