Advertisement
Guest User

CF ashow

a guest
Oct 5th, 2017
420
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.64 KB | None | 0 0
  1. function cbi_display_cf_order_data( $order ){
  2. $codice_fiscale = get_post_meta( $order->get_id(), '_codice_fiscale', true );
  3.    if( ! empty( $_POST['codice_fiscale'] ) ) ?>
  4.     <h2><?php _e( 'Extra Information' ); ?></h2>
  5.     <table class="shop_table shop_table_responsive additional_info">
  6.         <tbody>
  7.             <tr>
  8.                 <th><?php _e( 'VAT ID number:' ); ?></th>
  9.                 <td><?php echo $codice_fiscale; ?></td>
  10.             </tr>
  11.         </tbody>
  12.     </table>
  13.     <?php
  14. }
  15. add_action( 'woocommerce_thankyou', 'cbi_display_cf_order_data', 20 );
  16. add_action( 'woocommerce_view_order', 'cbi_display_cf_order_data', 20 );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement