Support » Plugin: WooCommerce » Downloadable (Billing Address)

  • JorgeRivero

    (@jorgerivero)


    Hi there,
    If I have two different products one is a simple product that need to be shipped and the other one is Virtual Downloadable, why when I select the last one, I’m still seeing the Billing Address option? This should be automatically hidden by Woocommerce plugin, many customers are leaving the shopping cart because to download they “Think” they need to add personal information like Billing Address, I know there are few options to get rid of these tabs adding codes in functions.php, but if I do that I will also hide this option for the item needs to shipped. Woocommerce plugin should already have the option to hide or show billing address and additional information tabs. This should be native in this plugin. Is there any workaround to solve this problem?

    Thanks.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Alundra

    (@alundra)

    You need to download a plugin. I recommend Woo Checkout for Digital Goods:
    https://wordpress.org/plugins/woo-checkout-for-digital-goods/

    And yes I completely agree, it’s really stupid this is not already a feature.

    khushbu padalia

    (@khushbupadalia)

    You can remove billing fields using below code

    function remove_billing_fields( $fields ) {
    global $woocommerce;
    // return the regular billing fields if we need shipping fields
    if ( $woocommerce->cart->needs_shipping() ) {
    return $fields;
    }
    // we don’t need the billing fields so empty all of them except the email
    unset( $fields[‘billing_country’] );
    unset( $fields[‘billing_first_name’] );
    unset( $fields[‘billing_last_name’] );
    unset( $fields[‘billing_company’] );
    unset( $fields[‘billing_address_1’] );
    unset( $fields[‘billing_address_2’] );
    unset( $fields[‘billing_city’] );
    unset( $fields[‘billing_state’] );
    unset( $fields[‘billing_postcode’] );
    unset( $fields[‘billing_phone’] );
    return $fields;
    }
    add_filter( ‘woocommerce_billing_fields’, ‘remove_billing_fields’, 20 );

    Thanks! I will try the plugin, the code unfortunately didn’t work.

    khushbu padalia

    (@khushbupadalia)

    Hi JorgeRivero,

    Have you used any plugin for checkout?

    Where have you added above code?

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