• Resolved Adrian Ladó

    (@adrianpo)


    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.0

    in 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?

Viewing 5 replies - 1 through 5 (of 5 total)
  • Hi @adrianpo

    Thanks for reaching out!

    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?

    I understand that your plugin requires an older version of WooCommerce to be installed first in order for it to work and you would like to know how to inform your users about it, correct?

    This is a bit of a complicated topic that would need some customization to address. Unfortunately, custom coding is not something we can assist with directly. However, I’ll keep this thread open for a bit to see if anyone from the community can lend a hand.

    If you have any other questions related to development or custom coding, don’t hesitate to reach out to some of the great resources we have available for support. The WooCommerce community is filled with talented open-source developers, and many of them are active on the channels listed below:

    Hope this helps!

    Thread Starter Adrian Ladó

    (@adrianpo)

    Let me be more clear, the plugin doesn’t require an older version of Woocommerce. Let’s take this example:

    1. The merchant has Woocommerce 4.5 for example, with the latest PlatiOnline version (it requires now a minimum version 3.0.4). It works on Woocommerce 4.5, aslo it works on latest Woocommerce version.
    2. I push an update that makes our plugin compatible with Woocommerce 6.9.0 and later
    3. If the user updates to the new version of PlatiOnline module having Woocommerce 4.5, it will break admin pages.

    What I want is to prevent the user from updating PlatiOnline plugin until he updates Woocoomerce to at least 6.9.0 showing him a message or something.

    We have some merchants who didn’t update Woocommerce regularly so if they would update PlatiOnline to the newest version they surely will have problems.

    Hi @adrianpo

    Thanks for providing further information about your issue here.

    What I want is to prevent the user from updating PlatiOnline plugin until he updates Woocoomerce to at least 6.9.0 showing him a message or something.

    In this case, since you are referring to a third-party plugin, PlatiOnline Payments, that we don’t provide support for based on our Support Policy, I recommend that you reach out to the developers of the plugin for further assistance. They will be better equipped to help you resolve any issues you’re experiencing with the plugin.

    https://wordpress.org/support/plugin/plationline/

    All the best and hopefully, the issue will be fixed soon.

    Thread Starter Adrian Ladó

    (@adrianpo)

    I’m really getting frustated about the support you are providing. I AM the developer for both the aforementioned plugins. Please be so kind to point me to someone I can work with regarding my issue.

    Roxy

    (@beautyofcode)

    Hey @adrianpo,

    I hear your frustration and I’d like to point you in the right direction.

    The best way to achieve this would be to implement a mechanism within the plugin that checks the installed WooCommerce version before allowing an update. This will require integrating version-checking logic into your plugin’s update process.

    If the installed version is below the required minimum (e.g., 6.9.0), it can display a notice within the plugin’s settings or dashboard prompting the user to update WooCommerce before updating the plugin.

    As @xue28 mentioned, support for custom code is outside our scope of support as we only offer guidance for the default features and functionality of our products that do not require any custom code to function or integrate.
     
    We have our developer resources portal that can help you get going, so I would recommend checking it further if you need more help with this:

    https://developer.woocommerce.com/
     
    Another option is to check our customizations page to hire an expert who can create a custom solution for you: 

    https://woocommerce.com/experts/

    Cheers!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Prevent payment gateway plugin update until Woocommerce minimum version’ is closed to new replies.