• Resolved newshop

    (@newshop)


    Hello,
    I would like to offer credit card payment and Klarna through Stripe. The integration has worked well so far, however I have the following problem:
    After filling out all required fields, I click on Klarna and get the error message: “Please fill out all required fields.” (although all required fields are filled out). Also, the Klarna options (pay later,…) do not appear.

    I have since figured out why this happens:
    I modified the default Woocommerce address fields as follows:
    “Address_2” I renamed to “house number” (required) > I did this so that the house number appears right after the street name.
    I renamed “Company” to “Additional Address” (not required).

    This modification seems to be incompatible with Klarna, because the above error message disappears only when I fill in the new “Additional Address” field, although it is not actually required.

    I made these changes with the help of a plugin called Flexible Checkout Fields. Dont know if it would make a difference if I’d make the changes though my childtheme’s functions.php? Or if such changes are not recommended at all when using Stripe payments?

    What can I do to keep my modification (important for Germany) and still be able to offer credit card and Klarna?

    Thank you in advance and kind regards

    • This topic was modified 4 years, 9 months ago by newshop.
    • This topic was modified 4 years, 9 months ago by newshop.
Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author Clayton R

    (@mrclayton)

    Hi @newshop,

    You are correct, the plugin depends on the WooCommerce naming convention to be able to provide the correct billing and shipping address. Any modifications to the naming conventions will have unintended consequences.

    My recommendation is for you to keep those field’s names the same as WC intended, and just sort them into the order that you want.

    Perhaps your Flexible Checkout Fields plugin will allow you to change the order of the fields?

    If not then you can accomplish this by adding a custom sort function to the WC checkout fields filter.

    Kind Regards,

    Thread Starter newshop

    (@newshop)

    Hi @mrclayton
    thank you very much for your fast reply.
    The problem is that I wanted to have a seperate field for house number because by default street and housenumber are one single field – this is very confusing for Germany and leads to people forget to enter the house number.

    So, I could try to add the house number as an additional field instead of modifiying the existing ones but I guess that will have unintended consequences too, right? Because Klarna & Co. only grab the information from the default Woocommerce fields?
    If so, I think I have to go back to the default fields and hoping that Woocommerce will introduce the seperate house number field one day…

    Kind regards from Germany

    Plugin Author Clayton R

    (@mrclayton)

    Hi @newshop

    Woocommerce provides two street address fields by default. One is named address_1 and the second is address_2 which is where customers would enter their house number or an apartment number for example.

    That is a separate field so I believe it satisfies your requirement of having the house number in a separate field.

    Kind regards,

    Thread Starter newshop

    (@newshop)

    Hi @mrclayton
    yes thats why I renamed the address_2 field to house number but as I also need an additional address field (needed for some German addresses and all Spanish addresses as they enter the province there) I had to rename the company field to additional address…but it seems that this is not a good idea when using payment providers, so I’ll need to revert back everything.
    Thank you for your support!

    Plugin Author Clayton R

    (@mrclayton)

    Hi @newshop

    My recommendation would be to leave the address_2 field as it is and just change its label to say house number. You can then add your own custom field that will capture the additional address information you need. That will satisfy the Stripe requirement while still allowing you to capture the additional address information that you need.

    Kind regards

    Thread Starter newshop

    (@newshop)

    Hello @mrclayton
    ok, thanks.
    I’ve since discovered that the cause of the error message wasn’t the renaming of the fields at all, but the Flexible Checkout Fields plugin itself (it just made the required fields optional via css, so Klarna complained anyway altough the other payment methods worked, dont really understand that but when I disable the plugin everything works fine). So I will uninstall the plugin and change the order via functions.php.

    So that means I could theoretically return to my original plan and rename the company field to “additional address” – not sure if that really makes sense though. Because then Stripe would get the information “Company: additional address data”, right? And if I add a whole new field instead of modifying the company field, Stripe probably wouldn’t get that info at all since my custom field isn’t a standard field, right?

    Bottom line: if I need an Additional Address field, it would be the safest way to leave all the fields as they are and just rename “Street address” to “Street address and house number”, hoping that the customers notice it, right?

    • This reply was modified 4 years, 9 months ago by newshop.
    Plugin Author Clayton R

    (@mrclayton)

    Bottom line: if I need an Additional Address field, it would be the safest way to leave all the fields as they are and just rename “Street address” to “Street address and house number”, hoping that the customers notice it, right?

    Yes, that’s the simplest solution.

    Or you could create a custom field for house number and then during the checkout process, concatenate the house number field to address_1.

    Kind Regards,

    Thread Starter newshop

    (@newshop)

    Ok, I’ll go for the simplest solution as I dont know how to handle it otherwise.
    Thank you very much!

Viewing 8 replies - 1 through 8 (of 8 total)

The topic ‘Klarna not compatible with customized address fields’ is closed to new replies.