• Josh

    (@jmccallweb)


    Hi, we have some virtual products that require a shipping address (in addition to a billing address). If I’m using the classic cart, the below will enable the shipping fields for all products.

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

    But that doesn’t seem to affect the block-based Woo checkout, which we’d really like to use. Is there a way to always include the shipping fields for the newer block-based checkout?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Support Zubair Zahid (woo-hc)

    (@doublezed2)

    Hello Josh,

    Thank you for contacting WooCommerce support.

    I understand you want to enable shipping fields for virtual products in the block-based checkout, similar to how the classic cart works with the woocommerce_cart_needs_shipping_address filter.

    Block-based checkout uses a different architecture, so this filter will not work.
    You may need a custom solution for this, and I recommend consulting a professional web developer.

    Please don’t hesitate to contact us again if you have more questions or concerns.
    We are here to help ??

    Best regards.

    Thread Starter Josh

    (@jmccallweb)

    Any chance you could point me in the right direction for enabling this for the block-based checkout? I’m a developer myself but I’m having trouble finding documentation for this particular question.

    Plugin Support Zubair Zahid (woo-hc)

    (@doublezed2)

    Hello Josh,

    Thank you for your reply.

    I understand you’re looking for guidance on enabling this for the block-based checkout.

    I recommend checking the documentation available on the WooCommerce GitHub repository.
    You can also post your question in the WooCommerce Community Slack, where many WooCommerce developers hang out and might be able to assist you.

    Please don’t hesitate to contact us again if you have more questions or concerns.
    We are here to help ??

    Best regards.

Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.