Created
February 22, 2021 17:52
-
-
Save Oscar-Abad-Folgueira/b39031b61de0075791da7915241e1ff7 to your computer and use it in GitHub Desktop.
WooCommerce Snippet: Quitar el campo de Código Postal del formulario del checkout
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* @snippet WooCommerce Snippet: Quitar el campo de Código Postal del formulario del checkout | |
* @author Oscar Abad Folgueira | |
* @author_url https://www.oscarabadfolgueira.com | |
* @snippet_url https://www.oscarabadfolgueira.com/ | |
*/ | |
add_filter( 'woocommerce_checkout_fields' , 'oaf_quitar_codigo_postal_checkout' ); | |
function oaf_quitar_codigo_postal_checkout( $campos_checkout ) { | |
unset($campos_checkout['billing']['billing_postcode']); | |
return $campos_checkout; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment