@@ 248-255 (lines=8) @@ | ||
245 | ), |
|
246 | ); |
|
247 | ||
248 | if ( 'no' === get_option( 'woocommerce_registration_generate_username' ) ) { |
|
249 | $this->fields['account']['account_username'] = array( |
|
250 | 'type' => 'text', |
|
251 | 'label' => __( 'Account username', 'woocommerce' ), |
|
252 | 'required' => true, |
|
253 | 'placeholder' => esc_attr__( 'Username', 'woocommerce' ), |
|
254 | ); |
|
255 | } |
|
256 | ||
257 | if ( 'no' === get_option( 'woocommerce_registration_generate_password' ) ) { |
|
258 | $this->fields['account']['account_password'] = array( |
|
@@ 257-264 (lines=8) @@ | ||
254 | ); |
|
255 | } |
|
256 | ||
257 | if ( 'no' === get_option( 'woocommerce_registration_generate_password' ) ) { |
|
258 | $this->fields['account']['account_password'] = array( |
|
259 | 'type' => 'password', |
|
260 | 'label' => __( 'Create account password', 'woocommerce' ), |
|
261 | 'required' => true, |
|
262 | 'placeholder' => esc_attr__( 'Password', 'woocommerce' ), |
|
263 | ); |
|
264 | } |
|
265 | $this->fields = apply_filters( 'woocommerce_checkout_fields', $this->fields ); |
|
266 | ||
267 | foreach ( $this->fields as $field_type => $fields ) { |