Advertisement
verygoodplugins

Untitled

Apr 4th, 2019
193
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.41 KB | None | 0 0
  1. function merge_additional_checkout_data( $customer_data, $order ) {
  2.  
  3.     $user_id = $order->get_user_id();
  4.  
  5.     $customer_data['billing_employer'] = get_user_meta( $user_id, 'billing_employer', true );
  6.     $customer_data['billing_occupation'] = get_user_meta( $user_id, 'billing_occupation', true );
  7.  
  8.     return $customer_data;
  9.  
  10. }
  11.  
  12. add_filter( 'wpf_woocommerce_customer_data', 'merge_additional_checkout_data', 10, 2 );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement