Updating, disabling and removing
What it does
Update EU Withdrawal to a new version, go back if you need to, and switch the module or a Pro capability off without losing your withdrawal requests. You run the updates with Composer. You switch the module off in Stores → Configuration → MageMe Extensions → EU Withdrawal.
Before you start
- Command-line access to your Magento root folder, and Composer.
- A backup of your database and files, made right before the update. You need it to go back.
- The changelog of the new version. Read it first: some versions change texts your customers see. After Composer
downloads a package, its changelog is the
CHANGELOG.mdfile in the package folder undervendor/mageme/.
Steps
Run every command in your Magento root folder.
Update the module
-
Update all EU Withdrawal packages and MageMe Core in one go:
composer update "mageme/module-eu-withdrawal*" mageme/module-core --with-dependenciesbin/magento setup:upgradebin/magento cache:flushThis updates the free module, the Hyvä package and the Pro packages together. Update them together: from version 1.2.0, the free module needs MageMe Core 2.2 or later, and Composer refuses to install it next to a Hyvä package older than 1.1.0 or an Auto-Approve package older than 1.0.3.
-
If your store runs in production mode, compile and deploy the static files:
bin/magento setup:di:compilebin/magento setup:static-content:deploy -
If your storefront uses a Hyvä theme, rebuild its styles:
# in the web/tailwind folder of your Hyvä themenpm run build -
Check the version at the top of Stores → Configuration → MageMe Extensions → EU Withdrawal. It shows EU Withdrawal and the installed version number.
What changed in 1.2.0
If you update to 1.2.0, the return and refund deadline texts are the same on every confirmation page. The "5–7 business days" promise and the prepaid return label text are gone. If you translated the old texts yourself, translate the new ones. The Return Shipping Notice is now empty by default; a notice you wrote yourself is kept. If you use your own copy of the receipt or submission email template, add the customer's name and email address to it, as the changelog describes. If your theme has its own copy of an Annex I text, add the sentence with the link to your withdrawal page. See Withdrawing from an order, step by step.
Go back to the previous version
To go back, restore the backup you made before the update, files and database together. Don't install an older version of the module over a database that a newer version has already updated.
Switch the module off
To stop the withdrawal workflow but keep everything, switch the module off in its settings. Your requests and settings stay as they are.
- Go to Stores → Configuration → MageMe Extensions → EU Withdrawal.
- Expand General.
- In Enable Module, select No.
- Click Save Config.
This turns off the withdrawal function on the storefront. Background jobs that are already queued, such as receipt retries and the overdue-refund digest, keep running. While the module is off, the admin shows a message that it is installed but not enabled, with a link to its settings.
Switch a Pro capability off
You can turn off a single Pro capability and keep its data. Its tables stay in the database, and the capability picks up its data again when you turn it back on. For example, to turn off Magic Link:
bin/magento module:disable MageMe_EUWithdrawalMagicLink
bin/magento setup:upgrade
bin/magento cache:flush
To turn it back on, run the same commands with the word enable in place of disable. If another Pro capability needs the one you turn off, Magento refuses and names the modules that depend on it. Turn those off too.
Remove the module
-
Remove the packages:
composer remove mageme/module-eu-withdrawal-hyva mageme/module-eu-withdrawalbin/magento setup:upgradebin/magento cache:flushIf you have Pro, remove its packages in the same command:
composer remove mageme/module-eu-withdrawal-receipt-verify-hyva mageme/module-eu-withdrawal-photo-hyva \mageme/module-eu-withdrawal-receipt-verify mageme/module-eu-withdrawal-magic-link \mageme/module-eu-withdrawal-annex-i mageme/module-eu-withdrawal-audit mageme/module-eu-withdrawal-evidence \mageme/module-eu-withdrawal-photo mageme/module-eu-withdrawal-auto-approve \mageme/module-eu-withdrawal-graph-ql mageme/module-eu-withdrawal-api \mageme/module-eu-withdrawal-hyva mageme/module-eu-withdrawalbin/magento setup:upgradebin/magento cache:flush -
The withdrawal records stay in your database. The module has no command that deletes them. Keep them as long as you may need them as a record, and keep the backup you made before the removal.
Don't switch the free module itself off from the command line while you need its records. Magento may then delete all EU Withdrawal tables on the next database update, with every withdrawal request in them. This was read in the code, not tested. To stop the workflow, select No in Enable Module instead, and make a backup before any change.
What you should see
After an update, the settings page shows the new version number and your settings are unchanged. After you switch the module off, the admin shows the "installed but not enabled" message, and customers no longer see the withdrawal option. After removing, Sales → Withdrawals is gone from the admin menu.
Limits
- Going back to an older version is only possible from a backup.
- Keeping the data of a Pro capability works from version 1.2.0 of the free module.
Troubleshooting
- Composer reports a conflict with mageme/module-core, the Hyvä package or Auto-Approve. Update all EU Withdrawal packages and MageMe Core in the same command, as in step 1. See Composer reports a version conflict.
- A new setting from the changelog is missing after the update. Check the version at the top of the settings page. If it is still the old one, Composer did not update the package. If it is the new one, run the last two commands of step 1 again.
- A Pro capability is missing after you turned it back on. Run all three commands, not only the first one.
What's next
- Going-live checklist: check your settings again after a major update.
- Installation: see the packages each storefront needs.
- Cron, queues and email delivery: check that background jobs still run after the update.