Created
November 15, 2022 19:05
-
-
Save jaccon/8ccc451484bf1d2a55148d5d9bf0535e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function fluidcheckout_change_billing_address_fields_args( $fields ) { | |
if ( array_key_exists( 'billing_state', $fields ) ) { $fields[ 'billing_state' ][ 'class' ][] = 'update_totals_on_change'; } | |
if ( array_key_exists( 'billing_city', $fields ) ) { $fields[ 'billing_city' ][ 'class' ][] = 'update_totals_on_change'; } | |
if ( array_key_exists( 'billing_postcode', $fields ) ) { $fields[ 'billing_postcode' ][ 'class' ][] = 'update_totals_on_change'; } | |
return $fields; | |
} | |
add_filter( 'woocommerce_billing_fields', 'fluidcheckout_change_billing_address_fields_args', 300 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment