SHARE
TWEET

Untitled

verygoodplugins Jun 17th, 2019 59 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function add_payout_field( $meta_fields ) {
  2.  
  3.     $meta_fields['payout'] = array( 'label' => 'Stripe Payout', 'group' => 'woocommerce' );
  4.     $meta_fields['pp_payout'] = array( 'label' => 'PayPal Payout', 'group' => 'woocommerce' );
  5.  
  6.     return $meta_fields;
  7.  
  8. }
  9.  
  10. add_filter( 'wpf_meta_fields', 'add_payout_field', 10 );
  11.  
  12. function get_payout_data( $order_data, $order ) {
  13.  
  14.     $order_data['payout'] = get_post_meta( $order->get_id(), '_stripe_net', true );
  15.     $order_data['pp_payout'] = get_post_meta( $order->get_id(), '_paypal_net', true );
  16.  
  17.     return $order_data;
  18.  
  19. }
  20.  
  21. add_filter( 'wpf_woocommerce_customer_data', 'get_payout_data', 10, 2 );
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top