Prevent payment gateway plugin update until Woocommerce minimum version
-
Hi everybody,
I maintain a payment gateway plugin built for Woocommerce (PlatiOnline Payments). Now the plugin is at version 6.2.12 and I want to publish a new major version.
Woocommerce added HPOS which implies some changes in my plugin. I have to use now the namespace Automattic\WooCommerce\Utilities\OrderUtil for OrderUtil::get_order_type($order_id) for example.
The problem is that this namespace was implemented in Woocommerce 6.9.0, so if I publish the update and an user having Woocommerce below this version updates to the latest version, there will be errors in his admin. This is tested with a client using Woocommerce 4.5.
I made some tests on another plugin (PostaPanduri), I added
* WC requires at least: 6.9.0
* WC tested up to: 8.2.0in that plugin latest version, but WordPress shows that a new version is available. Updating to the latest version breaks admin functionality.
Is there any way I can prevent this by requiring the user to first install Woocommerce 6.9.0 and than to be able to update my plugin? Maybe show a notice in WordPress that the updated version requires Woocommerce 6.9.0?
- The topic ‘Prevent payment gateway plugin update until Woocommerce minimum version’ is closed to new replies.