In Woocommerce, I'm adding a footnote to a specific checkout field using this code:
add_action( 'woocommerce_form_field_text','add_address_disclaimer', 100, 2 );
function add_address_disclaimer( $field, $key ){
global $woocommerce;
if ( is_checkout() && ( $key == 'billing_address_2') ) {
$field .= '<div class="fields-shipping-disclaimer"><p>' . __('We cannot ship to PO Boxes and FPO/APO addresses.') . '</p></div>';
}
return $field;
}
It works as it should on init... the footnote displays under the billing address 2 field:
However, on updating any fields that triggers the "update checkout" option, the custom footnote is not reflected in the refreshed checkout fields:
Anyone have a clue as to why this is happening?