Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Uriahs Victor

    (@uriahs-victor)

    Hi @alihmd94, Do you mean the Postcode field that appears in the default WooCommerce Checkout?

    Thread Starter alihmd94

    (@alihmd94)

    yes, I was trying to disable it but it did not work, I thought maybe the plugin is having a conflict with it.

    I used this code:

    function woocommerce_remove_additional_information_checkout($fields){
    unset($fields[‘billing’][‘billing_postcode’]);
    return $fields;
    }
    add_filter( ‘woocommerce_billing_fields’, ‘woocommerce_remove_additional_information_checkout’ );

    But it did not work

    Thread Starter alihmd94

    (@alihmd94)

    And Also I want to add a text field under the phone field for additional information.

    Plugin Author Uriahs Victor

    (@uriahs-victor)

    Hi, these are unrelated to the plugin so I will be closing this thread. But to remove the billing field this is the code you should be using:

    function woocommerce_remove_additional_information_checkout($fields){
    unset($fields['billing']['billing_postcode']);
    return $fields;
    }
    add_filter( 'woocommerce_checkout_fields', 'woocommerce_remove_additional_information_checkout' );

    Regarding your other question, if you want to add custom checkout fields then you can read here: https://www.businessbloomer.com/woocommerce-add-custom-checkout-field-php/ there are also plugins available to do what you’ve asked in both of your comments.

    I’ll close this thread now as its to do with custom code and directly the plugin.

    Thread Starter alihmd94

    (@alihmd94)

    Thank you for your reply, it worked. much appreciate your help.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Remove Field’ is closed to new replies.