mirror of
https://gh.wpcy.net/https://github.com/mainwp/Code-Snippets-Functions.git
synced 2026-04-29 11:32:21 +08:00
https://www.businessbloomer.com/woocommerce-refresh-checkout-upon-any-input-field-change/
10 lines
414 B
Text
10 lines
414 B
Text
add_filter( 'woocommerce_checkout_fields', 'wc_checkout_fields_trigger_refresh', 9999 );
|
|
|
|
function wc_checkout_fields_trigger_refresh( $fields ) {
|
|
$fields['billing']['billing_company']['class'][] = 'update_totals_on_change';
|
|
|
|
// ADD AS MANY FIELDS AS YOU LIKE, SAME FORMAT, SEE LIST BELOW
|
|
// E.G. $fields['account']['account_password']['class'][] = 'update_totals_on_change';
|
|
|
|
return $fields;
|
|
}
|