Advertisement
Guest User

Untitled

a guest
Aug 22nd, 2017
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.63 KB | None | 0 0
  1. <?php
  2. // Do NOT include the opening php tag shown above. Copy the code shown below.
  3.  
  4. add_action( 'woocommerce_after_order_notes', 'wpdesk_vat_field' );
  5. /**
  6. * VAT Number in WooCommerce Checkout
  7. */
  8. function wpdesk_vat_field( $checkout ) {
  9. echo '<div id="wpdesk_vat_field"><h2>' . __('VAT Number') . '</h2>';
  10.  
  11. woocommerce_form_field( 'vat_number', array(
  12. 'type' => 'text',
  13. 'class' => array( 'vat-number-field form-row-wide') ,
  14. 'label' => __( 'VAT Number' ),
  15. 'placeholder' => __( 'Enter your VAT number' ),
  16. ), $checkout->get_value( 'vat_number' ));
  17.  
  18. echo '</div>';
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement