{"id":31703,"date":"2021-09-09T12:03:32","date_gmt":"2021-09-09T07:33:32","guid":{"rendered":"https:\/\/zardis.net\/news\/?p=31703"},"modified":"2021-09-09T12:03:32","modified_gmt":"2021-09-09T07:33:32","slug":"eliminate-required-fields-on-the-woocommerce-payment-page","status":"publish","type":"post","link":"https:\/\/zardis.net\/news\/31703\/eliminate-required-fields-on-the-woocommerce-payment-page\/","title":{"rendered":"\u062d\u0630\u0641 \u0636\u0631\u0648\u0631\u06cc \u0628\u0648\u062f\u0646 \u0641\u06cc\u0644\u062f \u0647\u0627 \u062f\u0631 \u0635\u0641\u062d\u0647 \u067e\u0631\u062f\u0627\u062e\u062a \u0648\u0648\u06a9\u0627\u0645\u0631\u0633"},"content":{"rendered":"<p>\u0633\u0644\u0627\u0645 \u062e\u062f\u0645\u062a \u06a9\u0627\u0631\u0628\u0631\u0627\u0646 \u0647\u0645\u06cc\u0634\u06af\u06cc \u0632\u0631\u062f\u06cc\u0633<\/p>\n<p>\u0627\u0645\u0631\u0648\u0632 \u062f\u0631 \u0628\u062e\u0634 \u062f\u0627\u0646\u0634 \u0648 \u0641\u0646\u0627\u0648\u0631\u06cc \u0648 \u062f\u0631 \u0642\u0633\u0645\u062a \u0648\u0631\u062f\u067e\u0631\u0633 \u0622\u0645\u0648\u0632\u0634\u06cc \u0631\u0648 \u062a\u062f\u0627\u0631\u06a9 \u062f\u06cc\u062f\u06cc\u0645 \u06a9\u0647 \u062e\u06cc\u0644\u06cc \u0627\u0632 \u06a9\u0627\u0631\u0628\u0631 \u0647\u0627 \u062f\u0631 \u062e\u0648\u0627\u0633\u062a \u062f\u0627\u0634\u062a\u0646 \u0648 \u0646\u06cc\u0627\u0632 \u0628\u0647 \u0628\u0631\u062f\u0627\u0634\u062a\u0646 \u0636\u0631\u0648\u0631\u06cc \u0628\u0648\u062f\u0646 \u0641\u06cc\u0644\u062f \u0647\u0627\u06cc \u0648\u0648\u06a9\u0627\u0645\u0631\u0633 \u0628\u0648\u062f.<\/p>\n<p>\u0627\u06af\u0631 \u0645\u06cc\u062e\u0648\u0627\u06cc\u062f \u06a9\u0647 \u062e\u0637\u0627\u06cc \u0644\u0637\u0641\u0627 \u0641\u06cc\u0644\u062f \u0631\u0627 \u06a9\u0627\u0645\u0644 \u06a9\u0646\u06cc\u062f \u0648\u0648\u06a9\u0627\u0645\u0631\u0633 \u0628\u0631\u062f\u0627\u0634\u062a\u0647 \u0628\u0634\u0647 \u06a9\u0627\u0641\u06cc\u0647 \u0641\u0627\u06cc\u0644 function.php \u0642\u0627\u0644\u0628 \u0641\u0639\u0627\u0644\u062a\u0648\u0646 \u0631\u0648 \u0628\u0627\u0632 \u06a9\u0646\u06cc\u062f \u0648 \u0627\u06cc\u0646 \u06a9\u062f \u0631\u0648 \u0628\u0647 \u0627\u0648\u0646 \u0627\u0636\u0627\u0641\u0647 \u06a9\u0646\u06cc\u062f.<\/p>\n<pre class=\"brush: php; title: ; notranslate\" title=\"\">\r\nadd_filter( 'woocommerce_billing_fields', 'wp_parsi_unrequire_wc_email_field');\r\nfunction wp_parsi_unrequire_wc_email_field( $fields ) {\r\n    $fields&#x5B;'billing_email']&#x5B;'required'] = false;\r\nreturn $fields;\r\n}\r\n\r\n<\/pre>\n<p>\u0627\u06cc\u0646 \u06a9\u062f \u0641\u0642\u0637 \u0636\u0631\u0648\u0631\u06cc \u0628\u0648\u062f\u0646 \u0627\u06cc\u0645\u06cc\u0644 \u0631\u0648 \u0628\u0631 \u0645\u06cc\u062f\u0627\u0631\u0647 \u062d\u0627\u0644\u0627 \u0627\u06af\u0631 \u0628\u062e\u0648\u0627\u06cc\u062f \u0645\u0627 \u0628\u0642\u06cc \u0641\u06cc\u0644\u062f \u0647\u0627 \u0647\u0645 \u0628\u0631\u062f\u0627\u0634\u062a\u0647 \u0628\u0634\u0646 \u06a9\u0627\u0641\u06cc\u0647 <span class=\"pln\"> $fields<\/span><span class=\"pun\">[<\/span><span class=\"str\">&#8216;billing_email&#8217;<\/span><span class=\"pun\">][<\/span><span class=\"str\">&#8216;required&#8217;<\/span><span class=\"pun\">]<\/span> <span class=\"pun\">=<\/span> <span class=\"kwd\">false<\/span><span class=\"pun\">; \u0631\u0648 \u0628\u0647 \u0627\u0648\u0646 \u0627\u0636\u0627\u0641\u0647 \u06a9\u0646\u06cc\u062f \u0648 \u0628\u062c\u0627\u06cc \u0622\u06cc\u062f\u06cc billing_email \u0622\u06cc\u062f\u06cc \u0628\u062e\u0634 \u0645\u0648\u0631\u062f \u0646\u0638\u0631 \u0631\u0648 \u0642\u0631\u0627\u0631 \u0628\u062f\u06cc\u062f.<\/span><\/p>\n<pre class=\"brush: php; title: ; notranslate\" title=\"\">\r\nadd_filter( 'woocommerce_billing_fields', 'wp_parsi_unrequire_wc_email_field');\r\nfunction wp_parsi_unrequire_wc_email_field( $fields ) {\r\n    $fields&#x5B;'billing_email']&#x5B;'required'] = false;\r\n    $fields&#x5B;'billing_address_1']&#x5B;'required'] = false;\r\nreturn $fields;\r\n}\r\n\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u0633\u0644\u0627\u0645 \u062e\u062f\u0645\u062a \u06a9\u0627\u0631\u0628\u0631\u0627\u0646 \u0647\u0645\u06cc\u0634\u06af\u06cc \u0632\u0631\u062f\u06cc\u0633 \u0627\u0645\u0631\u0648\u0632 \u062f\u0631 \u0628\u062e\u0634 \u062f\u0627\u0646\u0634 \u0648 \u0641\u0646\u0627\u0648\u0631\u06cc \u0648 \u062f\u0631 \u0642\u0633\u0645\u062a \u0648\u0631\u062f\u067e\u0631\u0633 \u0622\u0645\u0648\u0632\u0634\u06cc \u0631\u0648 \u062a\u062f\u0627\u0631\u06a9 \u062f\u06cc\u062f\u06cc\u0645 \u06a9\u0647 \u062e\u06cc\u0644\u06cc \u0627\u0632 \u06a9\u0627\u0631\u0628\u0631 \u0647\u0627 \u062f\u0631 \u062e\u0648\u0627\u0633\u062a \u062f\u0627\u0634\u062a\u0646 \u0648 \u0646\u06cc\u0627\u0632 \u0628\u0647 \u0628\u0631\u062f\u0627\u0634\u062a\u0646 \u0636\u0631\u0648\u0631\u06cc \u0628\u0648\u062f\u0646 \u0641\u06cc\u0644\u062f \u0647\u0627\u06cc \u0648\u0648\u06a9\u0627\u0645\u0631\u0633 \u0628\u0648\u062f. \u0627\u06af\u0631 \u0645\u06cc\u062e\u0648\u0627\u06cc\u062f \u06a9\u0647 \u062e\u0637\u0627\u06cc \u0644\u0637\u0641\u0627 \u0641\u06cc\u0644\u062f \u0631\u0627 \u06a9\u0627\u0645\u0644 \u06a9\u0646\u06cc\u062f \u0648\u0648\u06a9\u0627\u0645\u0631\u0633 \u0628\u0631\u062f\u0627\u0634\u062a\u0647 \u0628\u0634\u0647 \u06a9\u0627\u0641\u06cc\u0647 \u0641\u0627\u06cc\u0644 function.php \u0642\u0627\u0644\u0628 \u0641\u0639\u0627\u0644\u062a\u0648\u0646 \u0631\u0648 [&hellip;]<\/p>\n","protected":false},"author":15,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":"","_members_access_role":[],"_members_access_error":""},"categories":[3003],"tags":[],"class_list":["post-31703","post","type-post","status-publish","format-standard","hentry","category-wp"],"acf":[],"_links":{"self":[{"href":"https:\/\/zardis.net\/news\/wp-json\/wp\/v2\/posts\/31703","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/zardis.net\/news\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/zardis.net\/news\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/zardis.net\/news\/wp-json\/wp\/v2\/users\/15"}],"replies":[{"embeddable":true,"href":"https:\/\/zardis.net\/news\/wp-json\/wp\/v2\/comments?post=31703"}],"version-history":[{"count":0,"href":"https:\/\/zardis.net\/news\/wp-json\/wp\/v2\/posts\/31703\/revisions"}],"wp:attachment":[{"href":"https:\/\/zardis.net\/news\/wp-json\/wp\/v2\/media?parent=31703"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/zardis.net\/news\/wp-json\/wp\/v2\/categories?post=31703"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/zardis.net\/news\/wp-json\/wp\/v2\/tags?post=31703"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}