• I suppose the link isn’t going to do much good since it goes to the page in wp-admin, which is where I need help with this, but, anyway…

    In Appearance > Customize > Woocommerce > Checkout >

    If I select “required”, it re-appears but as “optional”. If I select “optional”, it remains “optional”. If I select “hidden” for the phone field, the phone field does disappear. It appears there is just something wrong with the theme when it comes to making this field optional.

    • This topic was modified 4 years, 9 months ago by industrialweb.

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter industrialweb

    (@industrialweb)

    I added this to functions.php to override this:

    add_filter( ‘woocommerce_billing_fields’, ‘force_wc_phone_field’);
    function force_wc_phone_field( $fields ) {
    $fields[‘billing_phone’][‘required’] = true;
    return $fields;
    }

    But, if functions.php is ever overwritten, it’ll revert.

    (I know Ascension is a child theme, but since it is a Godaddy theme, I am not quite sure they would get the importance of not releasing updates to child themes.)

    Thread Starter industrialweb

    (@industrialweb)

    BTW… looking through files in the child theme, if this is template-related, it definitely has to be a problem with the parent theme, Primer, not just Ascension.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Cannot make phone number a required field in Woocommerce’ is closed to new replies.