![]() ![]() $this->checkout_fields = $woocommerce->countries->get_address_fields( $this->get_value('billing_country'), 'billing_' ) The checkout class adds the loaded fields to its ‘checkout_fields’ array, as well as adding a few other fields like “order notes”. Shipping: $address_fields = apply_filters('woocommerce_shipping_fields', $address_fields) This allows them to be edited by third-party plugins, themes and your own custom code.īilling: $address_fields = apply_filters('woocommerce_billing_fields', $address_fields) ![]() This allows WooCommerce to enable/disable fields based on the user’s location.īefore returning these fields, WooCommerce puts the fields through a filter. The billing and shipping fields for checkout pull from the countries class ( class-wc-countries.php) and the get_address_fields function. How Are Checkout Fields Loaded to WooCommerce? ↑ Back to top Installing and activating this extension overrides any code below that you try to implement and you cannot have custom checkout field code in your functions.php file when the extension is activated.Ĭustom code should be copied into your child theme’s functions.php file. If you are unfamiliar with code and resolving potential conflicts, we have an extension that can help: WooCommerce Checkout Field Editor. If you need to further customize a snippet, or extend its functionality, we highly recommend Codeable, or a Certified WooExpert. Note: We are unable to provide support for customizations under our Support Policy. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |