Targeting Checkout Fields in PHP
-
I’m using the function below on a testing site. I cannot seem to find a way to target the Billing City. I’m able to target other address fields just fine, but not this one. Any ideas?:
//Function that sets “required field” conditions on the checkout form, but it’s not working
add_filter( ‘woocommerce_billing_fields’, ‘wc_npr_filter_acct’, 10, 1 );
function wc_npr_filter_acct( $ftmfields ) {
$ftmfields[‘billing_city’][‘required’]= false;
return $ftmfields
}
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
The topic ‘Targeting Checkout Fields in PHP’ is closed to new replies.