rafwlaz

Untitled

Feb 25th, 2021
785
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /**
  2.  * Adds a payout record.
  3.  *
  4.  * @since 1.9
  5.  *
  6.  * @param array $args {
  7.  *     Optional. Arguments for adding a new payout record. Default empty array.
  8.  *
  9.  *     @type int          $affiliate_id  Affiliate ID.
  10.  *     @type int|array    $referrals     Referral ID or array of IDs.
  11.  *     @type string       $amount        Payout amount.
  12.  *     @type string       $payout_method Payout method.
  13.  *     @type string       $status        Payout status. Default 'paid'.
  14.  *     @type string|array $date          Payout date.
  15.  * }
  16.  * @return int|false The ID for the newly-added payout, otherwise false.
  17.  */
  18. function affwp_add_payout( $args = array() ) {
  19.  
  20.     if ( empty( $args['referrals'] ) || empty( $args['affiliate_id'] ) ) {
  21.         return false;
  22.     }
  23.  
  24.     if ( $payout = affiliate_wp()->affiliates->payouts->add( $args ) ) {
  25.         return $payout;
  26.     }
  27.  
  28.     return false;
  29. }
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×