Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save webdados/f5e9faf48b2f893d19e5f82ffe8ac12d to your computer and use it in GitHub Desktop.
Save webdados/f5e9faf48b2f893d19e5f82ffe8ac12d to your computer and use it in GitHub Desktop.
Disable city / postcode on the WooCommerce cart shipping calculator
<?php
//Disable city field on the WooCommerce cart shipping calculator
add_filter( 'woocommerce_shipping_calculator_enable_city', '__return_false' );
//Disable postcode field on the WooCommerce cart shipping calculator
add_filter( 'woocommerce_shipping_calculator_enable_postcode', '__return_false' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment