WooCommerce Checkout fields settings and customization hooks

后端 未结 2 1436
无人共我
无人共我 2020-12-20 01:00

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

2条回答
  •  有刺的猬
    2020-12-20 01:12

    For Original Fields please visit on your "woocommerce/templates/checkout/form-billing.php"
    
    Here you will see a function
    //This below line of code is responsible to get the fields
    $fields = $checkout->get_checkout_fields( 'billing' );
    
    //this below code is resposnible to echo those fields/labels etc
    woocommerce_form_field( $key, $field, $checkout->get_value( $key ) );
    
    If you want to go in depth please visit woocommerce/includes/wc-template-fucntions.php "function woocommerce_form_field( $key, $args, $value = null )", check this.
    

    Hope this may help you out!

提交回复
热议问题