Exemplo n.º 1
0
 /**
  * Search for a subscription attached to this transaction, and if found, update it.
  * @param array $tmr
  * @return boolean False (=stop hook) only if the transaction is for a subscription.
  */
 public static function onTransactionUpdated($tmr)
 {
     $sub = WpSubscription::newFromTransactionId($tmr['tmr_id']);
     if ($sub === null) {
         return true;
         // we are not concerned, so don't stop processing
     }
     $sub->onTransactionUpdated($tmr);
     return false;
     // the transaction update has been processed, so no other hook should take care of it
 }