{"id":2912,"date":"2016-04-29T14:38:22","date_gmt":"2016-04-29T14:38:22","guid":{"rendered":"http:\/\/musilda.cz\/?p=2912"},"modified":"2016-04-29T14:38:22","modified_gmt":"2016-04-29T14:38:22","slug":"jak-odstranit-pole-z-fakturacnich-udaju-na-pokladne-woocommerce","status":"publish","type":"post","link":"https:\/\/affinite.io\/cs\/jak-odstranit-pole-z-fakturacnich-udaju-na-pokladne-woocommerce\/","title":{"rendered":"Jak odstranit pole z faktura\u010dn\u00edch \u00fadaj\u016f na pokladn\u011b WooCommerce"},"content":{"rendered":"
Jednoduch\u00fd snippet, kter\u00fd v\u00e1m umo\u017en\u00ed odstranit vybran\u00e1 pole z formul\u00e1\u0159e na pokladn\u011b Woocommerce. Pro p\u0159ehlednost uv\u00e1d\u00edm v\u0161echny defaultn\u00ed pole. Odstran\u011bn\u00ed v\u0161ech pol\u00ed by byl zvl\u00e1\u0161tn\u00ed p\u0159\u00edpad, ale na takovou pot\u0159ebu m\u016f\u017eete narazit.<\/p>\n
add_filter( 'woocommerce_checkout_fields' , 'override_checkout_fields' );\n\nfunction override_checkout_fields( $fields ) {\n\n unset($fields['billing']['billing_first_name']);\n unset($fields['billing']['billing_last_name']);\n unset($fields['billing']['billing_company']);\n unset($fields['billing']['billing_address_1']);\n unset($fields['billing']['billing_address_2']);\n unset($fields['billing']['billing_city']);\n unset($fields['billing']['billing_postcode']);\n unset($fields['billing']['billing_country']);\n unset($fields['billing']['billing_state']);\n unset($fields['billing']['billing_phone']);\n unset($fields['order']['order_comments']);\n\n return $fields;\n\n}<\/pre>\n\n\n