Delivery Slots
How to Hide the City and State Fields From the Reservation Table
If you're looking to hide the city and state reservation fields from the reservation table in WooCommerce Delivery Slots, this guide will show you how to do so.
Coming soon: Iconic Delivery Slots is becoming part of Kadence Shop Kit. You may see both names used while we update the product, documentation, and customer experience.
If you’re looking to hide the city and state reservation fields from the reservation table in WooCommerce Delivery Slots, this guide will show you how to do so.
If you want to allow customers only to enter a ZIP/Postcode in the reservation process, you can. Right now, it’s possible to hide state and city fields but not country because it’s a required field.
Here’s the code snippet to get this done:
/**
* Disable City and State fields.
*
* @return void
*/
function iconic_wds_reservation_table_disable_address_fields() {
?>
<script>
jQuery( function() {
wp.hooks.addFilter( 'iconic_wds_reservation_table_city_visible', 'wds', function() {
return false;
} );
wp.hooks.addFilter( 'iconic_wds_reservation_table_state_visible', 'wds', function() {
return false;
} );
} );
</script>
<?php
}
add_action( 'wp_footer', 'iconic_wds_reservation_table_disable_address_fields' );
Filed under
Uncategorized
Was this page helpful?
Thanks for the feedback!