Skip to content

Instantly share code, notes, and snippets.

@BFTrick
Created May 26, 2016 15:09
Show Gist options
  • Select an option

  • Save BFTrick/7a7e5ca328e06bdb6e816c1770e4a526 to your computer and use it in GitHub Desktop.

Select an option

Save BFTrick/7a7e5ca328e06bdb6e816c1770e4a526 to your computer and use it in GitHub Desktop.

Revisions

  1. BFTrick created this gist May 26, 2016.
    13 changes: 13 additions & 0 deletions functions.php
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,13 @@
    <?php
    // Filter the checkout fields
    add_filter( 'woocommerce_checkout_fields', 'patricks_woocommerce_checkout_fields' );

    // Remove the billing phone - $fields is passed via the filter
    function patricks_woocommerce_checkout_fields( $fields ) {
    // remove the phone field
    unset($fields['billing']['billing_phone']);

    // make the billing email field fill up the entire space
    $fields['billing']['billing_email']['class'] = array('form-row-wide');
    return $fields;
    }