Skip to content

Instantly share code, notes, and snippets.

@swoboda
Created July 14, 2016 08:48
Show Gist options
  • Save swoboda/0fa83a627d845034565087482795e8c1 to your computer and use it in GitHub Desktop.
Save swoboda/0fa83a627d845034565087482795e8c1 to your computer and use it in GitHub Desktop.
<?php
add_action( 'woocommerce_after_order_notes', 'wpdesk_vat_field' );
/**
* Pole NIP w zamówieniu
*/
function wpdesk_vat_field( $checkout ) {
echo '<div id="wpdesk_vat_field"><h2>' . __('Dane do Faktury') . '</h2>';
woocommerce_form_field( 'vat_number', array(
'type' => 'text',
'class' => array( 'vat-number-field form-row-wide') ,
'label' => __( 'NIP' ),
'placeholder' => __( 'Wpisz NIP, aby otrzymać fakturę' ),
), $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