IMPORTANT: This code is made available in the hope that it will be useful, but without any warranty. See the GNU General Public License included with the code for more details. Automattic or WooCommerce support services are also not available to assist with the use of this code.
In some cases, if the tax settings change after some subscriptions have been created, their totals need to be recalculated in order to include the proper taxes. This plugin recalculates all the subscriptions totals.
To run the plugin, add ?wcs-recalculate-totals=true
to any admin URL.
&readd
parameter (?wcs-recalculate-totals=true&readd=true
) to force the plugin to delete all line items of the order and add them again before recalculating the totals (this helps in case tax settings have changed and the tax it not included properly just by recalculating the order totals)For each iteration of the fixer's code, a log entry will be added to a log file prefixed with 'wcs-recalculate-totals'
. To view this log file, visit WooCommerce > System Status > Logs.
This is an experimental extension and it hasn't been tested in all scenarios. Please backup your database before running it and try it first on a staging/development version of your site (confirm that all the products have been added again with the correct prices, taxes, shipping, etc) before running it on a production site.
All the subscripitons that have been already updated by the plugin will not be processed a second time because their ID is stored in the wcs_subscriptions_with_totals_updated
option. If you want to reset it to be able to process all your subscriptions again, you'll need to add the ?reset-updated-subs-option=true
parameter to the URL.
/wp-content/plugins/
directory of your WordPress siteThis plugin is released under GNU General Public License v3.0.