我希望能够在我的WooCommerce结帐字段中添加自定义CSS类.我正在使用twitter Bootstrap,我希望能够使用他们的.form-control类.
我查看了woocommerce模板文件夹,form-billing.php但我不确定将.form-control类添加到每个文本字段的位置.
这是代码 form-billing.php
<?php
/**
* Checkout billing information form
*
* @author WooThemes
* @package WooCommerce/Templates
* @version 2.1.2
*/
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
?>
<div class="woocommerce-billing-fields">
<?php if ( WC()->cart->ship_to_billing_address_only() && WC()->cart->needs_shipping() ) : ?>
<h3><?php _e( 'Billing & Shipping', 'woocommerce' ); ?></h3>
<?php else : ?>
<h3><?php _e( 'Billing Details', 'woocommerce' ); ?></h3>
<?php endif; ?>
<?php do_action( 'woocommerce_before_checkout_billing_form', $checkout ); ?> …Run Code Online (Sandbox Code Playgroud)