• Resolved gilles24

    (@gilles24)


    Hi

    I sell digital products and physical products on my site.
    When the customer is only buying digital products, I wish they didn’t have to enter the postale address fields.
    For this, I tried (on my site but also on a test site without any other plugin than woocommerce), several field editing plugins as well as a code (see here: https://jrwebconcept.fr/woocommerce/supprimer-les-champs-inutiles-de-facturation-pour-un-produit-virtuel-woocommerce/)

    Each time, it works correctly, except for one (annoying) detail: if the buyer first adds a virtual product, then continues to the order page, but then decides to return to the store to add a physical product , the text “undefined” appears in the address fields (instead of the indicative text normally found there).

    Would there be a way to remedy this?

    • This topic was modified 1 year, 8 months ago by gilles24.
    • This topic was modified 1 year, 8 months ago by gilles24.

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

Viewing 15 replies - 1 through 15 (of 17 total)
  • Hi @gilles24

    Thanks for reaching out!

    When the customer is only buying digital products, I wish they didn’t have to enter the postale address fields.

    This is the expected behavior for digital products since these can still be shipped. Should you wish that these products to not be shipped, you can enable the checkbox Virtual as well.

    For this, I tried (on my site but also on a test site without any other plugin than woocommerce), several field editing plugins as well as a code (see here: https://jrwebconcept.fr/woocommerce/supprimer-les-champs-inutiles-de-facturation-pour-un-produit-virtuel-woocommerce/)

    Each time, it works correctly, except for one (annoying) detail: if the buyer first adds a virtual product, then continues to the order page, but then decides to return to the store to add a physical product , the text “undefined” appears in the address fields (instead of the indicative text normally found there).

    Kindly be informed that custom coding is not something we can assist with directly. However, I’ll keep this thread open for a bit to see if anyone from the community can lend a hand.

    If you have any other questions related to development or custom coding, don’t hesitate to reach out to some of the great resources we have available for support. The WooCommerce community is filled with talented open-source developers, and many of them are active on the channels listed below:

    Hope this helps!

    Thread Starter gilles24

    (@gilles24)

    Hi,

    Thank you for your reply.

    However, I think the ability to not prompt for unnecessary fields when not needed (virtual products not delivered) would be a beneficial improvement for many woocommerce users.

    A development in this direction would therefore be welcome!

    Regards,
    Gilles

    Hi @gilles24

    We understand that some users may not require certain fields when creating virtual products that are not delivered. We appreciate your suggestion to make improvements in this area, and we will certainly take it into consideration for future updates.

    At WooCommerce, we are committed to providing our users with the best possible experience, and your feedback is invaluable in helping us achieve this goal. Hence, we invite you to submit a feature request for this option. Rest assured that we take our users’ feedback seriously and we always strive to improve our products.

    Thanks!

    Thread Starter gilles24

    (@gilles24)

    Hi,

    I suggested the improvement.
    That said, I think this is a bug since version 7.5 of woocommerce.
    Because I’ve been doing this for 3 months (address fields not required for an online digital product) and I had never noticed this “undefined” text.
    And above all, it also appears on invoices for the purchase of digital products when paying via Paypal (apparently not if payment via Stripe)… which has never happened before.

    • This reply was modified 1 year, 8 months ago by gilles24.
    Thread Starter gilles24

    (@gilles24)

    I confirm my previous message.
    I downgraded to version 7.4.1 and no more problems…
    So there is a problem from version 7.5.0 (and it’s not a normal behavior of the plugin).

    Hi,

    I am trying to follow the same steps you did, I added a product that is downloadable (digital):

    Then I added the digital product to cart and checkout, I go back and added a simple product. But I could not reproduce the issue.

    I am missing something? I am using WooCommerce 7.5.1. Can you tell me which Paypal plugin is your site using? So that I can try again to reproduce the issue.

    Looking forward to hearing from you.

    Thread Starter gilles24

    (@gilles24)

    Hello Igor,
    Thank you for your reply.
    I will try to be as precise as possible.

    • In order not to ask for the address for a virtual product, I added the code appearing on the link in my first post in the child theme’s functions.php file (and it works fine with version 7.4.1 of woocommerce)
    • For digital products, not shipped, I also checked “virtual” (not just “downloard”, as I see you have).
    • I use the Payment Plugins for PayPal WooCommerce plugin (the woocommerce payment plugin is catastrophic…), but I don’t think the problem comes from there, because it appears before the payment.
    • For shipping, I use the Colissimo shipping methods for WooCommerce plugin (but I don’t think that’s the problem either because I also tested with this plugin disabled).
      To see the error:
    • I first add a virtual product to the basket, then I click on the validation button to land on the checkout page;
    • I come back to the shop (by first clicking on the site logo…)
    • I then add a physical product (for which the address fields are of course required for shipping) to the cart;
    • arrived on the basket, the text “undefined” appears in the address fields (in any case with the plugin Colissimo shipping methods for WooCommerce; otherwise it appears on the checkout page).
      I remain at your disposal and I can, if you cannot reproduce the error in your environment, create a staging site so that you can test.
    Saif

    (@babylon1999)

    Hello @gilles24,

    In order not to ask for the address for a virtual product, I added the code appearing on the link in my first post in the child theme’s functions.php file (and it works fine with version 7.4.1 of woocommerce)

    You don’t need to add any code whatsoever, when a virtual product is selected(not downloadable) no shipping address will be required.


    Link to image: https://d.pr/i/6NZGcG

    I first add a virtual product to the basket, then I click on the validation button to land on the checkout page; I come back to the shop (by first clicking on the site logo…) I then add a physical product (for which the address fields are of course required for shipping) to the cart;

    I wasn’t able to reproduce this, here’s a screencast for refrence: https://d.pr/v/CkloDE

    The problem could be related to the plugins you mentioned. I suggest you clone your site to a staging environment WP-STAGING and disable all plugins except WooCommerce as well as switch your theme to Storefront.

    If you don’t encounter the problem after following these steps, then you can confirm that a theme/plugin conflict was the issue.

    To identify the culprit, enable the plugins one by one until the behaviour returns.

    Let us know how it goes!

    Thread Starter gilles24

    (@gilles24)

    Hi,

    You did not understand…
    I am removing the address from the billing fields…no shipping (I know that shipping fields are not requested for a virtual product).
    And if you couldn’t reproduce the problem, it’s probably because you didn’t add the code…

    Saif

    (@babylon1999)

    My apologies for the confusion, I thought the problem was with WooCommerce core.

    Please note that we can’t provide support for custom solutions as per our support policy.

    If you’re looking for a plugin solution to modify the checkout fields, you can check this extension.

    I should note that all extensions sold on WooCommerce.com have a 30-day refund policy. If the product doesn’t work the way you need it or you think another product would work better, we are more than happy to provide a full refund.

    Cheers!

    Thread Starter gilles24

    (@gilles24)

    OK…
    Checkout Field Editor extension does not allow not to ask for address fields (I tested it)
    And since all the extensions tested have the same issue, and this issue did not exist before version 7.5.0 of woocommerce, I think there is really a problem…

    • This reply was modified 1 year, 7 months ago by gilles24.

    Hi @gilles24

    Thank you for providing further information about your issue here.

    By any chance, are you referring to the premium plugin Checkout Field Editor here?

    If so and you have a valid license with us, can you please open a support request for us to investigate further about your issue.

    Otherwise, if this was from a third-party plugin, it would be best to reach out to the developers for further assistance here.

    Thanks!

    Thread Starter gilles24

    (@gilles24)

    Yes, I refer to this plugin in my last post… but it does not allow to exclude address fields… so it does not answer my problem…

    Roxy

    (@roxannestoltz)

    Hi @gilles24 ,

    After adding the code you provided to my test site and following the steps you shared, I see what you mean:

    Since the issue is a direct cause of this specific custom code, the code would need to be reviewed and updated to fix the issue.

    This being said, since custom code is outside our scope of support, you could look at hiring a developer or asking your customization requests in one of the below channels:

    And since all the extensions tested have the same issue, and this issue did not exist before version 7.5.0 of woocommerce, I think there is really a problem…

    I’d suggest reaching out to the respective plugin developers for further help with this issue, as they would then need to look at updating their plugin for compatibility with the latest version of WooCommerce.

    Hope this points you in the right direction!

    Saif

    (@babylon1999)

    Hello @gilles24,

    Just wanted to let you know a GitHub report was opened about this as the problem seems to impact the cart page as well, even without any conditional logic like in your case.

    Currently, we are unable to provide an estimate for when the team will review or address the issue as bug reports are evaluated based on various criteria. I suggest you subscribe to the thread for further updates.

    Cheers!

Viewing 15 replies - 1 through 15 (of 17 total)
  • The topic ‘Undefined text on adress fields’ is closed to new replies.