woocommerce_checkout_fields filter wiped out by ajax
-
Hi, I’m trying to update the placeholder on some checkout fields. There is a filter for that, it should be pretty simple.
add_filter(‘woocommerce_checkout_fields’, ‘wea_override_address_fields’);
function wea_override_address_fields( $fields ) {
$fields[‘billing’][‘billing_address_1’][‘placeholder’] = ‘House, School or Business number and stree address’;
return $fields;
}Unfortunately, it does work but only for a brief moment, as soon as the ajax updates the form, I’m back with the original placeholders. Any idea how to resolve? I’m running the latest woocommerce (3.2.3) so I have no idea if it use to work or not.
Here’s a screencast of my checkout page here. I hit refresh and if you look closely at around 0.05s the placeholder of the address gets updated but right after when ajax kicks in, the form refreshes and the placeholder is back to original. https://www.screencast.com/t/A7TnY8yU3
Thank you
- The topic ‘woocommerce_checkout_fields filter wiped out by ajax’ is closed to new replies.