• Resolved bananaman777

    (@bananaman777)


    Hi there,

    With Woocommerce it is possible to remove billing fields with a filter hook like:

    add_filter('woocommerce_billing_fields','custom_billing_fields');
    function custom_billing_fields( $fields = array() ) {
     unset($fields['billing_postcode']);
     unset($fields['billing_country']);
      *** etc, etc ***
     return $fields;
    }

    Can the billing fields be removed from WP Express Checkout in a similar manner? I only want the first name and email address fields remaining.

    Thanks for this amazing and simple plugin.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Hi, Are you referring to the fields shown in the payment popup window that comes from PayPal? I mean the window where you log into the PayPal account or pay using a card?

    That window is controlled by PayPal and they don’t offer the field customization that you asked for unfortunately.

    Thread Starter bananaman777

    (@bananaman777)

    I mean before Paypal. The popup where the order is placed.

    The input boxes I would like removed are named:
    wpec_billing_address_field_input
    wpec_billing_city_field_input
    wpec_billing_country_field_input
    wpec_billing_state_field_input
    wpec_billing_postal_code_field_input

    Hope that makes sense.

    Thank you. The following filter can be used to hide the billing info fields

    
    wpec_hide_billing_info_fields
    

    Normally, the billing info fields are only shown when it is appropriate (for example a 100% discount and it is a manual transaction which needs the billing info to complete an order:
    https://wp-express-checkout.com/free-product-checkout-process-100-discount/

    Can you give me more context in terms of what use case you currently have that is showing the billing fields (and maybe a screenshot or a URL of the page containing the payment button)? Are you using this plugin with WooCommerce as a gateway?

    Thread Starter bananaman777

    (@bananaman777)

    Normally, the billing info fields are only shown when it is appropriate (for example a 100% discount and it is a manual transaction which needs the billing info to complete an order:

    Oh I see. I was testing a product with price = $0. That solves the issue.

    For future reference, can you please show the code to implement the filter in functions.php? I’m a noob. Also, I imagine this will be a common question.

    Glad to hear the issue is resolved.

    The following is an example code snippet that should hide the fields:

    
    function custom_hide_fields_override( $amount ){
        return 1;
    }
    add_filter( 'wpec_hide_billing_info_fields', 'custom_hide_fields_override' );
    
Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Remove billing fields’ is closed to new replies.