Upgrade Custom Templates from 2.4.16 to 2.50

In 2.5.0, we made some changes around how the billing field markup is rendered to fix bugs and make the feature more robust. 

As part of this, we moved the markup for this section into a separate function that is now used by all templates:

cfw_billing_address_radio_group

To upgrade your templates to work with 2.5.0, you simply need to replace some HTML with the new function. 

In your custom template, find content.php and look for this block of HTML:

<div id="cfw-shipping-same-billing" class="cfw-module">
     <ul class="cfw-radio-reveal-group">
         <li class="cfw-radio-reveal-li cfw-no-reveal">
             <div class="cfw-radio-reveal-title-wrap">
                 <label class="cfw-radio-reveal-title-wrap cfw-radio-reveal-label">
                     <input type="radio" name="ship_to_different_address" id="ship_to_different_address_as_billing" value="0" class="garlic-auto-save" checked />
                     <span class="cfw-radio-reveal-title"><?php esc_html_e( 'Same as shipping address', 'checkout-wc' ); ?></span>
                 </label>
             </div>
         </li>
         <li class="cfw-radio-reveal-li">
             <div class="cfw-radio-reveal-title-wrap">
                 <label class="cfw-radio-reveal-label">
                     <input type="radio" name="ship_to_different_address" id="shipping_dif_from_billing" value="1" class="garlic-auto-save" />
                     <span class="cfw-radio-reveal-title"><?php esc_html_e( 'Use a different billing address', 'checkout-wc' ); ?></span>
                 </label>
             </div>
             <div class="cfw-radio-reveal-content-wrap" style="display: none">
                 <div id="cfw-billing-fields-container" class="cfw-radio-reveal-content <?php cfw_address_class_wrap( false ); ?>">
<?php cfw_get_billing_checkout_fields($checkout); ?>
                 </div>
             </div>
         </li>
     </ul>
 </div>

And replace it with this:

<?php cfw_billing_address_radio_group(); ?>

For example, in our test custom template, we have this block (selected):

Which would be replaced with:

That's it!