Created
January 2, 2019 13:04
-
-
Save vyskoczilova/284cbdc68d70995001f710d15f04522a to your computer and use it in GitHub Desktop.
Kybernaut IČO DIČ - povinná všechna pole
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 // vynechte tento řádek | |
/** | |
* @snippet Nastavit všechna pole (IČO, DIČ, IČ DPH) jako povinné pole | Kybernaut IČO DIČ | |
* @comment Pokud používáte plugin Kybernaut IČO DIČ a potřebujete mít pole všechna pole jako povinné, použijte tento snippet. | |
* @source https://kybernaut.cz/clanky/wp-multisite-maximalni-velikost-nahravaneho-souboru/ | |
* @author Karolína Vyskočilová (https://kybernaut.cz) | |
* @testedwith WordPress 5.0.2 | |
*/ | |
// ------------------- | |
add_filter( 'woocommerce_checkout_fields' , 'kbnt_override_checkout_fields', 100, 1 ); | |
function kbnt_override_checkout_fields( $fields ) { | |
$fields['billing']['billing_ic']['required'] = true; | |
$fields['billing']['billing_dic']['required'] = true; | |
$fields['billing']['billing_dic_dph']['required'] = true; | |
return $fields; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment