Advertisement
sterhel

wpsc-transaction_results_functions.php

Jan 4th, 2012
465
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 18.99 KB | None | 0 0
  1. <?php
  2.  
  3. /**
  4.  * WP eCommerce transaction results class
  5.  *
  6.  * This class is responsible for theming the transaction results page.
  7.  *
  8.  * @package wp-e-commerce
  9.  * @since 3.8
  10.  */
  11. function wpsc_transaction_theme() {
  12.     global $wpdb, $user_ID, $nzshpcrt_gateways, $sessionid, $cart_log_id, $errorcode;
  13.     $errorcode = '';
  14.     $transactid = '';
  15.     $dont_show_transaction_results = false;
  16.     if ( isset( $_GET['sessionid'] ) )
  17.         $sessionid = $_GET['sessionid'];
  18.  
  19.     if ( !isset( $_GET['sessionid'] ) && isset( $_GET['ms'] ) )
  20.         $sessionid = $_GET['ms'];
  21.  
  22.     if ( isset( $_GET['gateway'] ) && 'google' == $_GET['gateway'] ) {
  23.         wpsc_google_checkout_submit();
  24.         unset( $_SESSION['wpsc_sessionid'] );
  25.     }
  26.  
  27.     if ( isset( $_SESSION['wpsc_previous_selected_gateway'] ) && in_array( $_SESSION['wpsc_previous_selected_gateway'], array( 'paypal_certified', 'wpsc_merchant_paypal_express' ) ) )
  28.         $sessionid = $_SESSION['paypalexpresssessionid'];
  29.  
  30.     if ( isset( $_REQUEST['eway'] ) && '1' == $_REQUEST['eway'] )
  31.         $sessionid = $_GET['result'];
  32.     elseif ( isset( $_REQUEST['eway'] ) && '0' == $_REQUEST['eway'] )
  33.         echo $_SESSION['eway_message'];
  34.     elseif ( isset( $_REQUEST['payflow'] ) && '1' == $_REQUEST['payflow'] ){
  35.         echo $_SESSION['payflow_message'];
  36.         $_SESSION['payflow_message'] = '';
  37.     }
  38.    
  39.     $dont_show_transaction_results = false;
  40.    
  41.     if ( isset( $_SESSION['wpsc_previous_selected_gateway'] ) ) {
  42.         // Replaces the ugly if else for gateways
  43.         switch($_SESSION['wpsc_previous_selected_gateway']){
  44.             case 'paypal_certified':
  45.             case 'wpsc_merchant_paypal_express':
  46.                 echo $_SESSION['paypalExpressMessage'];
  47.  
  48.                 if(isset($_SESSION['reshash']['PAYMENTINFO_0_TRANSACTIONTYPE']) && in_array( $_SESSION['reshash']['PAYMENTINFO_0_TRANSACTIONTYPE'], array( 'expresscheckout', 'cart' ) ) )
  49.                     $dont_show_transaction_results = false;
  50.                 else
  51.                     $dont_show_transaction_results = true;     
  52.             break;
  53.             case 'dps':
  54.                 $sessionid = decrypt_dps_response();
  55.             break;
  56.                     //paystation was not updating the purchase logs for successful payment - this is ugly as need to have the databse update done in one place by all gatways on a sucsessful transaction hook not some within the gateway and some within here and some not at all??? This is getting a major overhaul but for here and now it just needs to work for the gold cart people!
  57.             case 'paystation':
  58.                 $ec = $_GET['ec'];
  59.                 $result= $_GET['em'];
  60.                
  61.                 if($result == 'Transaction successful' && $ec == 0)
  62.                         $processed_id = '3';                   
  63.                
  64.                 if($result == 'Insufficient Funds' && $ec == 5){
  65.                     $processed_id = '6';
  66.                
  67.                     $payment_instructions = printf( __( 'Sorry your transaction was not accepted due to insufficient funds <br /><a href="%1$s">Click here to go back to checkout page</a>.', 'wpsc' ), get_option( "shopping_cart_url" ) );
  68.                 }
  69.                 if($processed_id){
  70.                     $wpdb->update( WPSC_TABLE_PURCHASE_LOGS, array('processed' => $processed_id),array('sessionid'=>$sessionid), array('%f') );
  71.                 }      
  72.             break;
  73.         }
  74.     }
  75.    
  76.     if(!$dont_show_transaction_results ) {
  77.         if ( !empty($sessionid) ){
  78.             $cart_log_id = $wpdb->get_var( "SELECT `id` FROM `" . WPSC_TABLE_PURCHASE_LOGS . "` WHERE `sessionid`= " . $sessionid . " LIMIT 1" );
  79.             return transaction_results( $sessionid, true );
  80.         }else
  81.         printf( __( 'Sorry your transaction was not accepted.<br /><a href="%1$s">Click here to go back to checkout page</a>.', 'wpsc' ), get_option( "shopping_cart_url" ) );
  82.     }
  83.    
  84. }
  85.  
  86.  
  87. /**
  88.  * transaction_results function main function for creating the purchase reports, transaction results page, and email receipts
  89.  * @access public
  90.  *
  91.  * @since 3.7
  92.  * @param $sessionid (string) unique session id
  93.  * @param echo_to_screen (boolean) whether to output the results or return them (potentially redundant)
  94.  * @param $transaction_id (int) the transaction id
  95.  */
  96. function transaction_results( $sessionid, $display_to_screen = true, $transaction_id = null ) {
  97.     // Do we seriously need this many globals?
  98.     global $wpdb, $wpsc_cart, $echo_to_screen, $purchase_log, $order_url;
  99.     global $message_html, $cart, $errorcode,$wpsc_purchlog_statuses, $wpsc_gateways;
  100.    
  101.     $wpec_taxes_controller = new wpec_taxes_controller();
  102.     $is_transaction = false;
  103.     $errorcode = 0;
  104.     $purchase_log = $wpdb->get_row( "SELECT * FROM `" . WPSC_TABLE_PURCHASE_LOGS . "` WHERE `sessionid`= " . $sessionid . " LIMIT 1", ARRAY_A );
  105.     $order_status = $purchase_log['processed'];
  106.     $curgateway = $purchase_log['gateway'];
  107.     //new variable to check whether function is being called from resen_email
  108.     if(isset($_GET['email_buyer_id']))
  109.         $resend_email = true;
  110.     else
  111.         $resend_email = false;
  112.        
  113.     if( !is_bool( $display_to_screen )  )
  114.         $display_to_screen = true;
  115.        
  116.     $echo_to_screen = $display_to_screen;
  117.  
  118.     if ( is_numeric( $sessionid ) ) {
  119.         if ( $echo_to_screen )
  120.             echo apply_filters( 'wpsc_pre_transaction_results', '' );
  121.        
  122.         // New code to check whether transaction is processed, true if accepted false if pending or incomplete
  123.         $is_transaction = wpsc_check_purchase_processed($purchase_log['processed']);
  124.         $message_html = $message = stripslashes( get_option( 'wpsc_email_receipt' ) );
  125.    
  126.         if( $is_transaction ){
  127.             $message = __('The Transaction was successful', 'wpsc')."\r\n".$message;
  128.             $message_html = __('The Transaction was successful', 'wpsc')."<br />".$message_html;
  129.         }
  130.         $country = get_option( 'country_form_field' );
  131.         $billing_country = '';
  132.         $shipping_country = '';
  133.         if ( !empty($purchase_log['shipping_country']) ) {
  134.             $billing_country = $purchase_log['billing_country'];
  135.             $shipping_country = $purchase_log['shipping_country'];
  136.         } elseif (  !empty($country) ) {
  137.             $country = $wpdb->get_var( "SELECT `value` FROM `" . WPSC_TABLE_SUBMITED_FORM_DATA . "` WHERE `log_id`=" . $purchase_log['id'] . " AND `form_id` = '" . get_option( 'country_form_field' ) . "' LIMIT 1" );
  138.                        
  139.             $billing_country = $country;
  140.             $shipping_country = $country;
  141.         }
  142.  
  143.         $email = wpsc_get_buyers_email($purchase_log['id']);
  144.         $previous_download_ids = array( );
  145.         $product_list = $product_list_html = $report_product_list = '';
  146.    
  147.         $cart = $wpdb->get_results( "SELECT * FROM `" . WPSC_TABLE_CART_CONTENTS . "` WHERE `purchaseid` = '{$purchase_log['id']}'" , ARRAY_A );
  148.         if ( ($cart != null) && ($errorcode == 0) ) {
  149.             $total_shipping = '';
  150.             foreach ( $cart as $row ) {
  151.                 $link = array( );
  152.                 $wpdb->update(WPSC_TABLE_DOWNLOAD_STATUS, array('active' => '1'), array('cartid' => $row['id'], 'purchid'=>$purchase_log['id']) );
  153.                 do_action( 'wpsc_transaction_result_cart_item', array( "purchase_id" => $purchase_log['id'], "cart_item" => $row, "purchase_log" => $purchase_log ) );
  154.  
  155.                 if ( $is_transaction ) {
  156.  
  157.                     $download_data = $wpdb->get_results( "SELECT *
  158.                     FROM `" . WPSC_TABLE_DOWNLOAD_STATUS . "`
  159.                     WHERE `active`='1'
  160.                     AND `purchid`='" . $purchase_log['id'] . "'
  161.                     AND `cartid` = '" . $row['id'] . "'", ARRAY_A );
  162.  
  163.                     if ( count( $download_data ) > 0 ) {
  164.                         foreach ( $download_data as $single_download ) {
  165.                             $file_data = get_post( $single_download['product_id'] );
  166.                             // if the uniqueid is not equal to null, its "valid", regardless of what it is
  167.                             $argsdl = array(
  168.                                     'post_type' => 'wpsc-product-file',
  169.                                     'post_parent' => $single_download['product_id'],
  170.                                     'numberposts' => -1,
  171.                                     'post_status' => 'all',
  172.                                 );
  173.  
  174.                             $download_file_posts = (array)get_posts( $argsdl );
  175.    
  176.                             foreach((array)$download_file_posts as $single_file_post){
  177.                                 if($single_file_post->ID == $single_download['fileid']){
  178.                                     $current_Dl_product_file_post = $single_file_post;
  179.                                     break;
  180.                                 }
  181.                             }
  182.                             $file_name = $current_Dl_product_file_post->post_title;
  183.                            
  184.                             if ( $single_download['uniqueid'] == null )
  185.                                 $link[] = array( "url" => site_url( "?downloadid=" . $single_download['id'] ), "name" => $file_name );
  186.                             else
  187.                                 $link[] = array( "url" => site_url( "?downloadid=" . $single_download['uniqueid'] ), "name" => $file_name );
  188.                            
  189.                         }
  190.                     } else {
  191.                         $order_status = $purchase_log['processed'];
  192.                     }
  193.                     if( isset( $download_data['id'] ) )
  194.                         $previous_download_ids[] = $download_data['id'];
  195.                 }
  196.  
  197.                 do_action( 'wpsc_confirm_checkout', $purchase_log['id'] );
  198.  
  199.                 $total = 0;
  200.                 $shipping = $row['pnp'];
  201.                 $total_shipping += $shipping;
  202.  
  203.                 $total += ( $row['price'] * $row['quantity']);
  204.                 $message_price = wpsc_currency_display( $total, array( 'display_as_html' => false ) );
  205.                 $message_price_html = wpsc_currency_display( $total );
  206.                 $shipping_price = wpsc_currency_display( $shipping, array( 'display_as_html' => false ) );
  207.  
  208.                 if ( isset( $purchase['gateway'] ) && 'wpsc_merchant_testmode' != $purchase['gateway'] ) {
  209.                     if ( $gateway['internalname'] == $purch_data[0]['gateway'] )
  210.                         $gateway_name = $gateway['name'];
  211.                 } else {
  212.                     $gateway_name = "Manual Payment";
  213.                 }
  214.  
  215.                 $variation_list = '';
  216.  
  217.                 if ( !empty( $link ) ) {
  218.                     $additional_content = apply_filters( 'wpsc_transaction_result_content', array( "purchase_id" => $purchase_log['id'], "cart_item" => $row, "purchase_log" => $purchase_log ) );
  219.                     if ( !is_string( $additional_content ) ) {
  220.                         $additional_content = '';
  221.                     }
  222.                     $product_list .= " - " . $row['name'] . "  " . $message_price . " " . __( 'Click to download', 'wpsc' ) . ":";
  223.                     $product_list_html .= " - " . $row['name'] . "  " . $message_price_html . "&nbsp;&nbsp;" . __( 'Click to download', 'wpsc' ) . ":\n\r";
  224.                     foreach ( $link as $single_link ) {
  225.                         $product_list .= "\n\r " . $single_link["name"] . ": " . $single_link["url"] . "\n\r";
  226.                         $product_list_html .= "<a href='" . $single_link["url"] . "'>" . $single_link["name"] . "</a>\n";
  227.                     }
  228.                     $product_list .= $additional_content;
  229.                     $product_list_html .= $additional_content;
  230.                 } else {
  231.                
  232.                     $product_list.= " - " . $row['quantity'] . " " . $row['name'] . "  " . $message_price . "\n\r";
  233.                     if ( $shipping > 0 )
  234.                         $product_list .= sprintf(__( ' - Shipping: %s
  235. ', 'wpsc' ), $shipping_price);
  236.                     $product_list_html.= "\n\r - " . $row['quantity'] . " " . $row['name'] . "  " . $message_price_html . "\n\r";
  237.                     if ( $shipping > 0 )
  238.                         $product_list_html .=  sprintf(__( ' &nbsp; Shipping: %s
  239. ', 'wpsc' ), $shipping_price);
  240.                 }
  241.  
  242.                 //add tax if included
  243.                 if($wpec_taxes_controller->wpec_taxes_isenabled() && $wpec_taxes_controller->wpec_taxes_isincluded())
  244.                 {
  245.                     $taxes_text = ' - - '.__('Tax Included', 'wpsc').': '.wpsc_currency_display( $row['tax_charged'], array( 'display_as_html' => false ) )."\n\r";
  246.                     $taxes_text_html = ' - - '.__('Tax Included', 'wpsc').': '.wpsc_currency_display( $row['tax_charged'] );
  247.                     $product_list .= $taxes_text;
  248.                     $product_list_html .= $taxes_text_html;
  249.                 }// if
  250.  
  251.                 $report = get_option( 'wpsc_email_admin' );
  252.                 $report_product_list.= " - " . $row['quantity'] . " " . $row['name'] . "  " . $message_price . "\n\r";
  253.             } // closes foreach cart as row
  254.  
  255.             // Decrement the stock here
  256.             if ( $is_transaction )
  257.                 wpsc_decrement_claimed_stock( $purchase_log['id'] );
  258.  
  259.             if ( !empty($purchase_log['discount_data'])) {
  260.                 $coupon_data = $wpdb->get_row( "SELECT * FROM `" . WPSC_TABLE_COUPON_CODES . "` WHERE coupon_code='" . $wpdb->escape( $purchase_log['discount_data'] ) . "' LIMIT 1", ARRAY_A );
  261.                 if ( $coupon_data['use-once'] == 1 ) {
  262.                     $wpdb->update(WPSC_TABLE_COUPON_CODES, array('active' => '0', 'is-used' => '1'), array('id' => $coupon_data['id']) );
  263.                 }
  264.             }
  265.  
  266.             $total_shipping += $purchase_log['base_shipping'];
  267.  
  268.             $total = $purchase_log['totalprice'];
  269.            
  270.             $total_price_email = '';
  271.             $total_price_html = '';
  272.             $total_tax_html = '';
  273.             $total_tax = '';
  274.             $total_shipping_html = '';
  275.             $total_shipping_email = '';
  276.             if ( wpsc_uses_shipping() )
  277.                 $total_shipping_email.= sprintf(__( 'Total Shipping: %s
  278.     ', 'wpsc' ), wpsc_currency_display( $total_shipping, array( 'display_as_html' => false ) ) );
  279.             $total_price_email.= sprintf(__( 'Total: %s
  280. ', 'wpsc' ), wpsc_currency_display( $total, array( 'display_as_html' => false ) ));
  281.             if ( $purchase_log['discount_value'] > 0 ) {
  282.                 $discount_email = __( 'Discount', 'wpsc' ) . "\n\r: ";
  283.                 $discount_email .=$purchase_log['discount_data'] . ' : ' . wpsc_currency_display( $purchase_log['discount_value'], array( 'display_as_html' => false ) ) . "\n\r";
  284.                
  285.                 $report.= $discount_email . "\n\r";
  286.                 $total_shipping_email .= $discount_email;
  287.                 $total_shipping_html.= __( 'Discount', 'wpsc' ) . ": " . wpsc_currency_display( $purchase_log['discount_value'] ) . "\n\r";
  288.             }
  289.  
  290.             //only show total tax if tax is not included
  291.             if($wpec_taxes_controller->wpec_taxes_isenabled() && !$wpec_taxes_controller->wpec_taxes_isincluded()){
  292.                 $total_tax_html .= __('Total Tax', 'wpsc').': '. wpsc_currency_display( $purchase_log['wpec_taxes_total'] )."\n\r";
  293.                 $total_tax .= __('Total Tax', 'wpsc').': '. wpsc_currency_display( $purchase_log['wpec_taxes_total'] , array( 'display_as_html' => false ) )."\n\r";       
  294.             }
  295.             if ( wpsc_uses_shipping() )
  296.                 $total_shipping_html.= '<hr>' . sprintf(__( 'Total Shipping: %s
  297.     ', 'wpsc' ), wpsc_currency_display( $total_shipping ));
  298.             $total_price_html.= sprintf(__( 'Total: %s
  299. ', 'wpsc' ), wpsc_currency_display( $total ) );
  300.             $report_id = sprintf(__("Purchase # %s
  301. ", 'wpsc'), $purchase_log['id']);
  302.            
  303.             if ( isset( $_GET['ti'] ) ) {
  304.                 $message.= "\n\r" . __( 'Your Transaction ID', 'wpsc' ) . ": " . $_GET['ti'];
  305.                 $message_html.= "\n\r" . __( 'Your Transaction ID', 'wpsc' ) . ": " . $_GET['ti'];
  306.                 $report.= "\n\r" . __( 'Transaction ID', 'wpsc' ) . ": " . $_GET['ti'];
  307.             }
  308.             $message = apply_filters( 'wpsc_transaction_result_message', $message );
  309.             $message = str_replace( '%purchase_id%', $report_id, $message );
  310.             $message = str_replace( '%product_list%', $product_list, $message );
  311.             $message = str_replace( '%total_tax%', $total_tax, $message );
  312.             $message = str_replace( '%total_shipping%', $total_shipping_email, $message );
  313.             $message = str_replace( '%total_price%', $total_price_email, $message );
  314.             $message = str_replace( '%shop_name%', get_option( 'blogname' ), $message );
  315.             $message = str_replace( '%find_us%', $purchase_log['find_us'], $message );
  316.            
  317.             $report = apply_filters( 'wpsc_transaction_result_report', $report );
  318.             $report = str_replace( '%purchase_id%', $report_id, $report );
  319.             $report = str_replace( '%product_list%', $report_product_list, $report );
  320.             $report = str_replace( '%total_tax%', $total_tax, $report );
  321.             $report = str_replace( '%total_shipping%', $total_shipping_email, $report );
  322.             $report = str_replace( '%total_price%', $total_price_email, $report );
  323.             $report = str_replace( '%shop_name%', get_option( 'blogname' ), $report );
  324.             $report = str_replace( '%find_us%', $purchase_log['find_us'], $report );
  325.            
  326.             $message_html = apply_filters( 'wpsc_transaction_result_message_html', $message_html );
  327.             $message_html = str_replace( '%purchase_id%', $report_id, $message_html );
  328.             $message_html = str_replace( '%product_list%', $product_list_html, $message_html );
  329.             $message_html = str_replace( '%total_tax%', $total_tax_html, $message_html );
  330.             $message_html = str_replace( '%total_shipping%', $total_shipping_html, $message_html );
  331.             $message_html = str_replace( '%total_price%', $total_price_html, $message_html );
  332.             $message_html = str_replace( '%shop_name%', get_option( 'blogname' ), $message_html );
  333.             $message_html = str_replace( '%find_us%', $purchase_log['find_us'], $message_html );
  334.  
  335.             if ( !empty($email) ) {
  336.                 add_filter( 'wp_mail_from', 'wpsc_replace_reply_address', 0 );
  337.                 add_filter( 'wp_mail_from_name', 'wpsc_replace_reply_name', 0 );
  338.                 $message = apply_filters('wpsc_email_message', $message, $report_id, $product_list, $total_tax, $total_shipping_email, $total_price_email);
  339.  
  340.                 if ( !$is_transaction ) {
  341.    
  342.                     $payment_instructions = strip_tags( stripslashes( get_option( 'payment_instructions' ) ) );
  343.                     if(!empty($payment_instructions))
  344.                         $payment_instructions .= "\n\r";                   
  345.                     $message = __( 'Thank you, your purchase is pending, you will be sent an email once the order clears.', 'wpsc' ) . "\n\r" . $payment_instructions . $message;
  346.                     $message_html = __( 'Thank you, your purchase is pending, you will be sent an email once the order clears.', 'wpsc' ) . "\n\r" . $payment_instructions . $message_html;
  347.                    
  348.                     // prevent email duplicates
  349.                     if ( ! get_transient( "{$sessionid}_pending_email_sent" ) ) {
  350.                         wp_mail( $email, __( 'Order Pending: Payment Required', 'wpsc' ), $message );
  351.                         set_transient( "{$sessionid}_pending_email_sent", true, 60 * 60 * 12 );
  352.                     }
  353.                 } elseif ( ! get_transient( "{$sessionid}_receipt_email_sent" ) ) {
  354.                     wp_mail( $email, __( 'Purchase Receipt', 'wpsc' ), $message );
  355.                     set_transient( "{$sessionid}_receipt_email_sent", true, 60 * 60 * 12 );
  356.                 }
  357.             }
  358.  
  359.             remove_filter( 'wp_mail_from_name', 'wpsc_replace_reply_name' );
  360.             remove_filter( 'wp_mail_from', 'wpsc_replace_reply_address' );
  361.  
  362.             $report_user = __( 'Customer Details', 'wpsc' ) . "\n\r";
  363.             $form_sql = "SELECT * FROM `" . WPSC_TABLE_SUBMITED_FORM_DATA . "` WHERE `log_id` = '" . $purchase_log['id'] . "'";
  364.             $form_data = $wpdb->get_results( $form_sql, ARRAY_A );
  365.            
  366.             if ( $form_data != null ) {
  367.                 foreach ( $form_data as $form_field ) {
  368.                     $form_data = $wpdb->get_row( "SELECT * FROM `" . WPSC_TABLE_CHECKOUT_FORMS . "` WHERE `id` = '" . $form_field['form_id'] . "' LIMIT 1", ARRAY_A );
  369.        
  370.                     switch ( $form_data['type'] ) {
  371.                         case "country":
  372.                             $country_code = $form_field['value'];
  373.                             $report_user .= $form_data['name'] . ": " . wpsc_get_country( $country_code ) . "\n";
  374.                             //check if country has a state then display if it does.
  375.                             $country_data = wpsc_country_has_state($country_code);
  376.                             if(($country_data['has_regions'] == 1))
  377.                                 $report_user .= __( 'Billing State', 'wpsc' ) . ": " . wpsc_get_region( $purchase_log['billing_region'] ) . "\n";
  378.                             break;
  379.  
  380.                         case "delivery_country":
  381.                             $report_user .= $form_data['name'] . ": " . wpsc_get_country( $form_field['value'] ) . "\n";           
  382.                             break;
  383.                    
  384.                         default:
  385.                             if ($form_data['name'] == 'State' && is_numeric($form_field['value'])){
  386.                                 $report_user .= __( 'Delivery State', 'wpsc' ) . ": " . wpsc_get_state_by_id( $form_field['value'], 'name' ) . "\n";
  387.                             }else{
  388.                             $report_user .= wp_kses( $form_data['name'], array( ) ) . ": " . $form_field['value'] . "\n";
  389.                             }
  390.                             break;
  391.                     }
  392.                 }
  393.             }
  394.  
  395.             $report_user .= "\n\r";
  396.             $report = $report_id . $report_user . $report;
  397.  
  398.             //echo '======REPORT======<br />'.$report.'<br />';
  399.             //echo '======EMAIL======<br />'.$message.'<br />';
  400.             if ( (get_option( 'purch_log_email' ) != null) && ( $purchase_log['email_sent'] != 1 ) ){
  401.                 wp_mail( get_option( 'purch_log_email' ), __( 'Purchase Report', 'wpsc' ), $report );
  402.                 $wpdb->update(WPSC_TABLE_PURCHASE_LOGS, array('email_sent' => '1'), array( 'sessionid' => $sessionid ) );
  403.             }
  404.  
  405.             /// Adjust stock and empty the cart
  406.             $wpsc_cart->submit_stock_claims( $purchase_log['id'] );
  407.             $wpsc_cart->empty_cart();
  408.         }
  409.     }
  410. }
  411.  
  412. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement