Created
August 22, 2017 14:35
-
-
Save swoboda/349b6955910fe64abd1f47e4b9010b9d to your computer and use it in GitHub Desktop.
vat_number_checkout_en.php
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
<?php | |
// Do NOT include the opening php tag shown above. Copy the code shown below. | |
add_action( 'woocommerce_after_order_notes', 'wpdesk_vat_field' ); | |
/** | |
* VAT Number in WooCommerce Checkout | |
*/ | |
function wpdesk_vat_field( $checkout ) { | |
echo '<div id="wpdesk_vat_field"><h2>' . __('VAT Number') . '</h2>'; | |
woocommerce_form_field( 'vat_number', array( | |
'type' => 'text', | |
'class' => array( 'vat-number-field form-row-wide') , | |
'label' => __( 'VAT Number' ), | |
'placeholder' => __( 'Enter your VAT number' ), | |
), $checkout->get_value( 'vat_number' )); | |
echo '</div>'; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment