{"id":1599,"date":"2014-03-05T18:45:26","date_gmt":"2014-03-05T18:45:26","guid":{"rendered":"http:\/\/musilda.cz\/?p=1599"},"modified":"2014-03-05T18:45:26","modified_gmt":"2014-03-05T18:45:26","slug":"jak-zrusit-povinny-telefon-v-objednavce-woocommerce","status":"publish","type":"post","link":"https:\/\/affinite.io\/cs\/jak-zrusit-povinny-telefon-v-objednavce-woocommerce\/","title":{"rendered":"Jak zru\u0161it povinn\u00fd telefon v objedn\u00e1vce Woocommerce"},"content":{"rendered":"\n

Dne\u0161n\u00ed kousek k\u00f3du, pro vylep\u0161en\u00ed va\u0161eho Woocommerce eshopu v\u00e1m umo\u017en\u00ed odstranit nutnost vypl\u0148ov\u00e1n\u00ed telefonu p\u0159i objedn\u00e1vce. Tak\u017ee pokud nechcete, aby musel z\u00e1kazn\u00edk vypl\u0148ovat telefonn\u00ed \u010d\u00edslo, vlo\u017ete n\u00e1sleduj\u00edc\u00ed k\u00f3d do functions.php.<\/p>\n\n\n\n\n\n\n\n

add_filter( 'woocommerce_billing_fields', 'wc_remove_filter_phone', 10, 1 );\nfunction wc_remove_filter_phone( $address_fields ) {\n    $address_fields['billing_phone']['required'] = false;\n\n    return $address_fields;\n}\n<\/pre>\n\n\n\n

Obdobn\u011b m\u016f\u017eete z nepovinn\u00e9ho pole ud\u011blat povinn\u00e9, pouze m\u00edsto false pou\u017eijete true.<\/p>\n\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":"

Dne\u0161n\u00ed kousek k\u00f3du, pro vylep\u0161en\u00ed va\u0161eho Woocommerce eshopu v\u00e1m umo\u017en\u00ed odstranit nutnost vypl\u0148ov\u00e1n\u00ed telefonu p\u0159i objedn\u00e1vce. Tak\u017ee pokud nechcete, aby musel z\u00e1kazn\u00edk vypl\u0148ovat telefonn\u00ed \u010d\u00edslo, vlo\u017ete n\u00e1sleduj\u00edc\u00ed k\u00f3d do functions.php.<\/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":[425],"class_list":["post-1599","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-snippety","category-woocommerce","category-woocommerce-snippety","tag-woocommerce"],"_links":{"self":[{"href":"https:\/\/affinite.io\/cs\/wp-json\/wp\/v2\/posts\/1599"}],"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=1599"}],"version-history":[{"count":0,"href":"https:\/\/affinite.io\/cs\/wp-json\/wp\/v2\/posts\/1599\/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=1599"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/affinite.io\/cs\/wp-json\/wp\/v2\/categories?post=1599"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/affinite.io\/cs\/wp-json\/wp\/v2\/tags?post=1599"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}