Beispiel #1
0
 /**
  * Resession
  */
 public static function resession()
 {
     global $Shopp;
     if (method_exists('Shopping', 'resession')) {
         // Shopp >= 1.2
         // @see https://github.com/ingenesis/shopp/blob/1.2/Shopp.php#L362-L368
         // @see https://github.com/ingenesis/shopp/blob/1.2/core/model/Shopping.php#L94-L135
         Shopping::resession();
     } elseif (method_exists($Shopp, 'resession')) {
         // Shopp <= 1.1.9.1
         // @see https://github.com/ingenesis/shopp/blob/1.1.9.1/Shopp.php#L385-L423
         // @see https://github.com/ingenesis/shopp/blob/1.1/Shopp.php#L382-L413
         $Shopp->resession();
     }
 }
Beispiel #2
0
 /**
  * Resets the session and redirects to the thank you page
  *
  * @author Jonathan Davis
  * @since 1.1
  *
  * @return void
  **/
 public function success()
 {
     if (!empty($this->inprogress)) {
         $this->purchase = $this->inprogress;
         ShoppPurchase(new ShoppPurchase($this->purchase));
         $this->inprogress = false;
         // Remove the order processing lock
         delete_transient('shopp_order_' . ShoppShopping()->session());
         do_action('shopp_order_success', ShoppPurchase());
         Shopping::resession();
     }
     if (false !== $this->purchase) {
         Shopp::redirect(Shopp::url(false, 'thanks'));
     }
 }