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