Advertisement
verygoodplugins

Untitled

Jun 16th, 2019
271
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.45 KB | None | 0 0
  1. function add_payout_field( $meta_fields ) {
  2.  
  3.     $meta_fields['payout'] = array( 'label' => 'Stripe Payout', 'group' => 'woocommerce' );
  4.  
  5.     return $meta_fields;
  6.  
  7. }
  8.  
  9. add_filter( 'wpf_meta_fields', 'add_payout_field' );
  10.  
  11. function get_payout_data( $order_data, $order ) {
  12.  
  13.     $order_data['payout'] = get_post_meta( $order->get_id(), '_stripe_net', true );
  14.  
  15.     return $order_data;
  16.  
  17. }
  18.  
  19. add_filter( 'wpf_woocommerce_customer_data', 'get_payout_data', 10, 2 );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement