Created
December 13, 2018 19:06
-
-
Save clifgriffin/7e924d94e55702f017bb757ffe7522e1 to your computer and use it in GitHub Desktop.
Require address line 2 in the shipping address.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Do NOT include the opening php tag. | |
// Place in your theme's functions.php file | |
add_filter('woocommerce_checkout_fields', 'require_shipping_address2_checkout_field' ); | |
function require_shipping_address2_checkout_field( $fields ) { | |
$fields['shipping']['shipping_address_2']['required'] = true; | |
return $fields; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment