コード例 #1
0
ファイル: class-exchange.php プロジェクト: nerrad/AffiliateWP
 public function mark_referral_complete($transaction, $old_status, $old_status_cleared, $new_status)
 {
     $new_status = it_exchange_get_transaction_status($transaction->ID);
     $new_status_cleared = it_exchange_transaction_is_cleared_for_delivery($transaction->ID);
     if ($new_status != $old_status && !$old_status_cleared && $new_status_cleared) {
         $this->complete_referral($transaction->ID);
     }
 }
コード例 #2
0
 /**
  * Returns a boolean. Is this transaction a status that warrants delivery of any products attached to it?
  *
  * @since unreleased
  *
  * @param boolean $cleared passed in through WP filter. Ignored here.
  * @param mixed   $transaction
  *
  * @return boolean
  */
 public static function transaction_is_cleared_for_delivery($cleared, $transaction)
 {
     return Pronamic_WP_Pay_Extensions_IThemesExchange_IThemesExchange::ORDER_STATUS_PAID === it_exchange_get_transaction_status($transaction);
 }