Skip to content

Upgrading from a Version Prior to v3.0.0

lat9 edited this page Nov 8, 2025 · 1 revision

The distribution for the current version of the Stripe payment module is quite different than versions prior to v3.0.0. Various language files and CSS files have been merged and there are no longer core- or template-overrides required.

When upgrading a site from a version prior to v3.0.0, you should first place the site into Maintenance Mode (set Configuration :: Website Maintenance :: Down for Maintenance: ON/OFF to true). Then, follow these steps to remove no longer wanted files from the previous version prior to installing v3.0.0 or later.

Remove Language Files

Remove no longer used language files, note that previous versions distributed 'english', 'french', 'german' and 'japanese' language files.

  1. /includes/languages/{language}/extra_definitions/lang.account.php
  2. /includes/languages/{language}/extra_definitions/lang.checkout_confirmation.php
  3. /includes/languages/{language}/extra_definitions/lang.checkout_one_confirmation.php

Remove CSS Files

Compare the following .css files in your active template's /css sub-directory to the like-named files in your current Stripe distribution. If there are no changes, the files can be safely removed; otherwise, remove only the styling that you've added for your site's customization.

  1. /includes/templates/YOUR_TEMPLATE/css/account.css
  2. /includes/templates/YOUR_TEMPLATE/css/checkout_confirmation.css
  3. /includes/templates/YOUR_TEMPLATE/css/checkout_one_confirmation.css

Remove Files No Longer Used

v3.0.0 of the Stripe payment module performs many of its customizations via its auto-loaded observer, making the following files no longer needed. Each of the files listed below should be deleted from your site's file-system.

  1. /includes/functions/stripe_data_delete.php
  2. /includes/init_includes/overrides/init_header.php
  3. /includes/modules/pages/checkout_confirmation/jscript_stripe.php
  4. /includes/modules/pages/checkout_one_confirmation/jscript_stripe.php

Remove Core and Template File Changes

Versions of the payment module prior to v3.0.0 required core- and template-file changes for its operation. These changes must be removed prior to installing v3.0.0 or later of the Stripe payment module.

/includes/modules/pages/checkout_payment/header_php.php

Towards the bottom of the file, find this section and remove it:

//--------stripe-------->
 unset($_SESSION['order_add_comment'])
//-----end-stripe------->

/includes/templates/YOUR_TEMPLATE/templates/tpl_account_default.php

Note: This change should also be applied to /includes/templates/template_default/templates/tpl_account_default.php!

Towards the bottom of each file, find this section and remove it:

<!--------stripe-------->
<?php
$dir_delete_php = DIR_FS_CATALOG . DIR_WS_FUNCTIONS . 'stripe_data_delete.php';
require $dir_delete_php;
stripe_id_exist();
$class="";
if ($registered_customer === 'false') {
  $class="hide";
}elseif($registered_customer === 'true'){
  $class="";
  echo '<h2 style="color: #2254dd;  font-size: 24px;  font-weight: bold;">Stripe</h2>';
  echo TEXT_STRIPE_CARD_INFORMATION ;
}
?>
<style>
.hide{display:none;}
</style>
<form method="post">
<input type="submit" name="Delete" id="btn_delete"
value="<?PHP echo TEXT_DELETE_STRIPE ?>"
class="<?PHP echo $class; ?>">

</form>
<!--------end-stripe-------->

/includes/templates/YOUR_TEMPLATE/templates/tpl_checkout_confirmation_default.php

Note: These changes should also be applied to /includes/templates/template_default/templates/tpl_checkout_confirmation_default.php !

Towards the bottom of each file, find this section and remove it:

<!--------stripe-------->
<!-- Display a payment form -->
    <form id="payment-form">
    <div id="payment-head" style="color: #2254dd;  font-size: 24px;  font-weight: bold; margin:24px 0 12px;">Stripe</div>    
    <div id="payment-element">
        <!--Stripe.js injects the Payment Element-->
      </div>
      <div id="payment-message" class="hidden"></div>
      <button id="submit">
      <div class="spinner hidden" id="spinner"></div>
        <span id="button-text"><?php echo BUTTON_CONFIRM_ORDER_ALT; ?></span>
      </button>
      <div id="payment-foot"><?php echo TEXT_PAYMENT_STRIPE_MODULE_CORP; ?></div>
      </form>   
<!--------end-stripe-------->

Then, find this section at the bottom of each file and remove it:

<!--------stripe-------->

<?php
$jason_stripe_select = json_encode($stripe_select);
$jason_sess_life = json_encode($SESS_LIFE);
$timeoutURL = '"' . HTTPS_SERVER . DIR_WS_HTTPS_CATALOG . 'index.php?main_page=time_out"';
?>
<script>

var stripe_select = JSON.parse('<?php echo $jason_stripe_select; ?>'); 
var sess_life = JSON.parse('<?php echo $jason_sess_life; ?>'); 
var timeoutURL = JSON.parse('<?php echo $timeoutURL; ?>'); 

if (stripe_select === "True") {

    document.getElementById('btn_submit').style.display ="none";
    document.getElementById('checkout_confirmation').style.display ="none";
    document.getElementById('payment-form','submit').display ="block";
    setTimeout(function(){window.location.href = timeoutURL;}, sess_life*1000);


  }else{
    document.getElementById('btn_submit').display ="block";
    document.getElementById('checkout_confirmation').display ="block";
    document.getElementById('payment-form','submit').style.display ="none";

  }

</script>
<!--------end-stripe-------->  

/includes/templates/YOUR_TEMPLATE/templates/tpl_checkout_one_confirmation.php

Note: These changes should also be applied to /includes/templates/template_default/templates/tpl_checkout_one_confirmation_default.php ... if it exists!

Towards the middle of each file, find this section and remove it:

<!--------  stripe  -------->
      <div id="payment-message" class="hidden"></div>
      <button id="submit">
      <div class="spinner hidden" id="spinner"></div>
        <span id="button-text"><?php echo BUTTON_CONFIRM_ORDER_ALT; ?></span>
      </button>
      <div id="payment-foot"><?php echo TEXT_PAYMENT_STRIPE_MODULE_CORP; ?></div>
      </form>   
<!--------end-stripe-------->

Then, at the end of each file, find this section and remove it:

<!--------stripe-------->

<?php
$jason_stripe_select = json_encode($stripe_select);
$jason_sess_life = json_encode($SESS_LIFE);
$timeoutURL = '"' . HTTPS_SERVER . DIR_WS_HTTPS_CATALOG . 'index.php?main_page=time_out"';
?>
<script>

var stripe_select = JSON.parse('<?php echo $jason_stripe_select; ?>'); 
var sess_life = JSON.parse('<?php echo $jason_sess_life; ?>'); 
var timeoutURL = JSON.parse('<?php echo $timeoutURL; ?>'); 

if (stripe_select === "True") {

    document.getElementById('btn_submit').style.display ="none";
    document.getElementById('checkout_confirmation').style.display ="none";
    document.getElementById('payment-form','submit').display ="block";
    setTimeout(function(){window.location.href = timeoutURL;}, sess_life*1000);


  }else{
    document.getElementById('btn_submit').display ="block";
    document.getElementById('checkout_confirmation').display ="block";
    document.getElementById('payment-form','submit').style.display ="none";

  }

</script>
<!--------end-stripe-------->