WooCommerce Checkout字段设置和自定义挂钩 [英] WooCommerce Checkout fields settings and customization hooks

查看:83
本文介绍了WooCommerce Checkout字段设置和自定义挂钩的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有人知道Woocommerce插件文件中原始结帐字段设置在哪里吗?例如原始字段标签和占位符等?

does anyone know where the original checkout field settings are, within the Woocommerce plugin files? E.g The original field labels and placeholders etc?

推荐答案


没有无Checkout字段设置在Woocommerce中……

There is no Checkout fields settings in Woocommerce…

但是您可以自定义它们,方法是:

-用于自定义结帐字段的Woocommerce开发人员文档参考

-或任何可用的插件

1)结帐字段基本上由3个Woocommerce类管理:

- WC_Checkout 使用 get_checkout_fields()方法 (和 get_value() 方法)

- WC_Countries 使用 get_default_address_fields()方法 get_address_fields()方法

- WC_Customer 类也用于我的帐户地址字段。

1) Checkout fields are managed essentially by 3 Woocommerce classes:
- WC_Checkout Class using get_checkout_fields() method (and get_value() method)
- WC_Countries Class using get_default_address_fields() method and get_address_fields() method
- WC_Customer Class used also for My account Address fields.

并使用 woocommerce_form_field()模板功能,其中定义了不同的字段类型。

And uses woocommerce_form_field() template function where the different field types are defined.

2)定制中涉及的主要因素是:

- woocommerce_default_address_fields 过滤钩和与StackOverFlow相关的线程

- woocommerce_checkout_fields 过滤钩和与StackOverFlow相关的线程

- woocommerce_billing_fields 过滤器挂钩和与StackOverFlow相关的线程

- woocommerce_shipping_fields 过滤钩和与StackOverFlow相关的线程

- woocommerce_form_field _ {$ args\ [type\]} 过滤器挂钩和与StackOverFlow相关的线程

2) The main hooks involved in customizations are:
- woocommerce_default_address_fields filter hook and StackOverFlow related threads
- woocommerce_checkout_fields filter hook and StackOverFlow related threads
- woocommerce_billing_fields filter hook and StackOverFlow related threads
- woocommerce_shipping_fields filter hook and StackOverFlow related threads
- woocommerce_form_field_{$args\[type\]} filter hook and StackOverFlow related threads

3)涉及的主要相关模板 可以通过主题覆盖是:

- checkout / form-checkout.php

- checkout / form-b​​illing.php

-结帐/form-shipping.php

-结帐/表单记录.php

3) The main related templates involved that can be overridden through via the theme are:
- checkout/form-checkout.php
- checkout/form-billing.php
- checkout/form-shipping.php
- checkout/form-loging.php

相关: 模板结构&通过主题覆盖模板

这篇关于WooCommerce Checkout字段设置和自定义挂钩的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆