• Resolved wp_user1

    (@wp_user1)


    I am using WooCommerce 8.7.0 and selling digital products.

    Therefore we do not need address data and want to make the checkout process more efficient.

    All solutions I found in web (either via plugin or code snippet) did not work. What’s the way to to this for the version?

    Thanks and kind regards!

Viewing 6 replies - 1 through 6 (of 6 total)
  • Did you find a fix for this yet? My comment stating I’m experiencing the same was deleted and I was told to create a new thread. However judging by the looks of the forum there isn’t much point.

    If you find a fix, please kindly let me know. Many thanks!

    Thread Starter wp_user1

    (@wp_user1)

    For me, I fixed it this way:

    I disabled the block editor for the checkout page. Then I added this to my functions.php in Theme:

    add_filter( 'woocommerce_default_address_fields', 'adjust_requirement_of_checkout_address_fields' );
    function adjust_requirement_of_checkout_address_fields( $fields ) {
        $fields['first_name']['required']   = false;
        $fields['last_name']['required']    = false;
        $fields['company']['required']      = false;
        $fields['country']['required']      = false;
        $fields['address_1']['required']    = false;
        $fields['address_2']['required']    = false;
        $fields['city']['required']         = false;
        $fields['state']['required']        = false;
        $fields['postcode']['required']     = false;
    
        return $fields;
    }
    
    add_filter( 'woocommerce_billing_fields', 'adjust_requirement_of_checkout_contact_fields');
    function adjust_requirement_of_checkout_contact_fields( $fields ) {
        $fields['billing_phone']['required']    = false;
        $fields['billing_email']['required']    = true;
    
        return $fields;
    }

    When disabling the block editor you can also use plugins like Flexible Checkout Fields or Digital Goods for WooCommerce Checkout.

    That worked a treat, thank you very much.

    Plugin Support omarfpg a11n

    (@omarfpg)

    Hi @wp_user1 and @kaa00,

    Correct working with the classic shortcode pages instead of the blocks offer more flexibility and you can easily customize them with code snippets or plugins.

    I’m glad you’ve found a fix already for this. So I’m going to mark this as resolved. Feel free to start a new thread if you have any more questions.

    All the best,
    Omar

    Thread Starter wp_user1

    (@wp_user1)

    But I do not understand, that you cannot archieve that goal on the block editor, which is the standard installation. Will this be implemented soon?

    Plugin Support ckadenge (woo-hc)

    (@ckadenge)

    Hello @wp_user1,

    I understand your concern about the block editor functionality.

    At this time, the feature you’re referring to is not available in the standard installation of the block editor.

    However, you can easily have the feature incorporated by filling the feature request form here. You can read more about the feature request from this guide.

    I hope this helps.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Digital products: no address data fields needed’ is closed to new replies.