Skip to content

Instantly share code, notes, and snippets.

@clifgriffin
Created July 23, 2019 20:38
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save clifgriffin/6fe9da6401697962d0bec43e1932e7be to your computer and use it in GitHub Desktop.
Move Checkout for WooCommerce phone field.
<?php
// Do NOT include the opening php tag.
// Place in your theme's functions.php file
add_filter( 'woocommerce_default_address_fields', 'move_phone_fields', 100001 );
function move_phone_fields( $fields ) {
if ( isset( $fields['phone'] ) ) {
$fields['phone']['priority'] = 14;
}
return $fields;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment