{"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

Dal\u0161\u00ed u\u017eite\u010dn\u00e9 snippety najdete na str\u00e1nce U\u017eite\u010dn\u00e9 snippety pro WooCommerce<\/a><\/strong> <\/p>\n","protected":false},"excerpt":{"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. add_filter( ‚woocommerce_checkout_fields‘ , ‚override_checkout_fields‘ ); function override_checkout_fields( $fields ) { unset($fields[‚billing‘][‚billing_first_name‘]); unset($fields[‚billing‘][‚billing_last_name‘]); unset($fields[‚billing‘][‚billing_company‘]); unset($fields[‚billing‘][‚billing_address_1‘]); unset($fields[‚billing‘][‚billing_address_2‘]); unset($fields[‚billing‘][‚billing_city‘]); unset($fields[‚billing‘][‚billing_postcode‘]); unset($fields[‚billing‘][‚billing_country‘]); unset($fields[‚billing‘][‚billing_state‘]); unset($fields[‚billing‘][‚billing_phone‘]); unset($fields[‚order‘][‚order_comments‘]); return $fields;<\/p>\n","protected":false},"author":1,"featured_media":8732,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[19,25,29],"tags":[355,425],"class_list":["post-2912","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-snippety","category-woocommerce","category-woocommerce-snippety","tag-snippet","tag-woocommerce"],"_links":{"self":[{"href":"https:\/\/affinite.io\/cs\/wp-json\/wp\/v2\/posts\/2912"}],"collection":[{"href":"https:\/\/affinite.io\/cs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/affinite.io\/cs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/affinite.io\/cs\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/affinite.io\/cs\/wp-json\/wp\/v2\/comments?post=2912"}],"version-history":[{"count":0,"href":"https:\/\/affinite.io\/cs\/wp-json\/wp\/v2\/posts\/2912\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/affinite.io\/cs\/wp-json\/wp\/v2\/media\/8732"}],"wp:attachment":[{"href":"https:\/\/affinite.io\/cs\/wp-json\/wp\/v2\/media?parent=2912"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/affinite.io\/cs\/wp-json\/wp\/v2\/categories?post=2912"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/affinite.io\/cs\/wp-json\/wp\/v2\/tags?post=2912"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}