Home Forums WoodMart support forum Problem with checkout fields

Problem with checkout fields

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #131977

    dimmisel
    Participant

    Hello guys.

    We are trying to edit some values of checkout fields by code in functions.php. We have done this in past in other eshops.

    We have put the code below in our file:
    /* Hook in*/
    add_filter( ‘woocommerce_checkout_fields’ , ‘custom_override_checkout_fields’, 1 );
    function custom_override_checkout_fields( $fields ) {
    $fields[‘billing’][‘billing_state’][‘required’] = true;
    $fields[‘billing’][‘billing_company’][‘priority’] = ‘1003’;
    $fields[‘billing’][‘billing_address_2’][‘placeholder’] = ‘Όροφος, διαμέρισμα κτλ. (προαιρετικό)’;
    return $fields;
    }
    You can find our checkout form here:
    https://woocommerce-170844-802553.cloudwaysapps.com/checkout

    The strange thing about this is that the fields are starting working at this way we mention here but then it change again to default ones. Maybe this happen from your theme javascript? If not, how this happens?

    #131980

    Artem Temos
    Keymaster

    Hello,

    Could you please check how it works with some default WordPress theme like twentysixteen to understand is it our theme issue or not?

    Regards

Viewing 2 posts - 1 through 2 (of 2 total)