• My functions.php customization for ordering billing fields stopped working after I updated to Woocommerce 3

    This is the code:

    add_filter("woocommerce_checkout_fields", "order_fields");
    
    function order_fields($fields) {
    
    $order = array( 
    "billing_email", 
    "billing_custom_field_10", 
    "billing_first_name", 
    "billing_last_name", 
    "billing_birthdate", 
    "billing_rg", 
    "billing_cpf", 
    "billing_custom_field_1", 
    "billing_country", 
    "billing_postcode", 
    "billing_address_1", 
    "billing_number", 
    "billing_address_2", 
    "billing_neighborhood", 
    "billing_city", 
    "billing_state", 
    "billing_phone", 
    "billing_cellphone", 
    "billing_custom_field_1", 
    "billing_custom_field_2", 
    "billing_custom_field_5", 
    "billing_custom_field_9" 
    
    ); 
    foreach($order as $field) 
    { 
    $ordered_fields[$field] = $fields["billing"][$field]; 
    }
    
    $fields["billing"] = $ordered_fields; 
    return $fields;
    
    } 

    You can access https://loja.coexiste.com.br/ingresso (one page checkout) or try to buy any free product to see that the order is not working… (and breaking my css)

    Any idea how can I fix this?

    Tks in Advance

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Woocommerce Action Filter for billing fields stopped working after V3 update’ is closed to new replies.