Forum Replies Created

Viewing 1 replies (of 1 total)
  • A partir do Woocommerce 3.0 você pode fazer isso usando priority.
    Experimenta mudar o código para:

    
    add_filter("woocommerce_checkout_fields", "order_fields");
    
    function order_fields($fields) {
    
        $order = array(
            "billing_first_name", 
            "billing_last_name", 
    	"billing_email", 
            "billing_phone",
    	"billing_postcode", 
    	"billing_address_2", 
            "billing_address_1", 
            "billing_neighborhood", 
            "billing_city", 
            "billing_state", 
            "billing_country" 
        );
        $i = 10;
        foreach($order as $field)
        {
            $fields["billing"][$field]["priority"] = $i;
            $i++;
        }
        return $fields;
    }
    
Viewing 1 replies (of 1 total)