Adobe Commerce - Update Extension

How can I update my Adobe Commerce Extension?


The Afterpay extension update method depends on how you, the merchant, have originally installed the Afterpay module.

If you used Composer to install the Afterpay module, then use Composer to update it. If you used a manual process to install the Afterpay module, then use a manual update to update it.

The Afterpay extension update process depends on whether you want to use Composer to make the update, or do a manual update. We recommend that you update with Composer.

In either case, backup your system files before you start an update.

Update with Composer

Note

In the instructions below, the [ADOBE-COMMERCE] folder refers to the root folder where Adobe Commerce/Magento is installed.

  1. Open the Command Line Interface (CLI) and go to the [ADOBE-COMMERCE] folder on your server.

  2. Run one of the following commands in the table to update the Afterpay module, depending on the Magento version:

Magento versionCommand to run
2.4composer require afterpay-global/module-afterpay:^5
2.3composer require afterpay-global/module-afterpay:^4
< 2.3.0composer require afterpay-global/module-afterpay:^4
  1. Make sure that Composer finishes the installation without errors.

  2. Run the Adobe Commerce setup upgrade: php bin/magento setup:upgrade.

  3. Run the Adobe Commerce Dependencies Injection Compile: php bin/magento setup:di:compile.

  4. Run the Adobe Commerce Static Content deployment: php bin/magento setup:static-content:deploy.

  5. Run the Adobe Commerce System Cache Flush: php bin/magento cache:flush.

Manual Update

This method does not use Composer. It is more complex than using Composer, but just as effective when done correctly. Follow the instructions below.

Remove old Afterpay files/folders

Note

In the instructions below, the [ADOBE-COMMERCE] folder refers to the root folder where Adobe Commerce/Magento is installed.

  1. Remove all the files in: [ADOBE-COMMERCE]/app/code/Afterpay/Afterpay. Then you are ready to download the Afterpay Extension.

Download the Afterpay Extension

The extension is on GitHub. Do the following:

  1. Go to GitHub for the link to Magento 2. The source code needed depends on your version of Magento. For these details, see the Readme file.

  2. Under the green <> Code heading, click Download ZIP. See screenshot below:

adobe-comm-manual-install.png

  1. Unzip your files and put them into a temporary folder.
📘 Install Folder

You can install Adobe Commerce in any folder on your server. In this guide, [ADOBE-COMMERCE] is the name of the root folder where Adobe Commerce is installed.

Run the Commands

  1. Copy the files from your temporary folder to the [ADOBE-COMMERCE]/app/code/Afterpay/Afterpay folder. The temporary folder is the one you created in Step 3 in the Download the Afterpay Extension section above.

  2. Open the Command Line Interface (CLI) and make sure you are the owner of the [ADOBE-COMMERCE] folder. Run all CLI commands as the owner of the folder, not root and without sudo.

  3. From the CLI, run the commands below:

CommandDescription
php bin/magento module:enable Afterpay_AfterpayEnable Afterpay extension.
php bin/magento setup:upgradeAdobe Commerce setup upgrade.
php bin/magento setup:di:compileAdobe Commerce dependencies injection compile.
php bin/magento setup:static-content:deployAdobe Commerce static content deployment.
php bin/magento cache:flushAdobe Commerce system cache flush.

Now, for US merchants only, you need to repeat the process for the Cash App Pay Extension for Magento 2:

  1. Remove the existing files in the [ADOBE-COMMERCE]/app/code/Afterpay/CashApp folder.

  2. Download and copy the files to the [ADOBE-COMMERCE]/app/code/Afterpay/CashApp folder. The source code path is based on the Magento version here.

  3. Open the Command Line Interface (CLI) and run the commands below:

CommandDescription
php bin/magento module:enable Afterpay_CashAppEnable the Cash App Pay extension.
php bin/magento setup:upgradeAdobe Commerce setup upgrade.
php bin/magento setup:di:compileAdobe Commerce dependencies injection compile.
php bin/magento setup:static-content:deployAdobe Commerce static content deployment.
php bin/magento cache:flushAdobe Commerce system cache flush.

You can find a table of the Afterpay Plugins for Adobe Commerce/Magento 2 here. It also contains useful information on the manual installation process.