Created
July 24, 2014 16:38
-
-
Save acanza/3b3168a5dfac5d6d4b13 to your computer and use it in GitHub Desktop.
Añadir el campo NIF a la página de pago de WooCommerce
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Añade el campo NIF a la página de checkout de WooCommerce | |
*/ | |
add_action( 'woocommerce_after_order_notes', 'agrega_mi_campo_personalizado' ); | |
function agrega_mi_campo_personalizado( $checkout ) { | |
echo '<div id="additional_checkout_field"><h2>' . __('Información adicional') . '</h2>'; | |
woocommerce_form_field( 'nif', array( | |
'type' => 'text', | |
'class' => array('my-field-class form-row-wide'), | |
'label' => __('NIF'), | |
'placeholder' => __('Ej: 99999999D'), | |
), $checkout->get_value( 'nif' )); | |
echo '</div>'; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment