• Resolved Edith Allison

    (@terragirl)


    Hi, this is a minor bug: The plugin fails the WooCommerce HPOS compatibility test when run with WP CLI, as the compatibility statement is located inside a file that only runs in WP Admin.

    What happens: If I try to enable HPOS with WP CLI, I’m getting:
    Warning: [Failed] Some installed plugins are incompatible. Please review the plugins by going to WooCommerce > Settings > Advanced > Features and see the “Order data storage” section.
    Error: HPOS pre-checks failed, please see the errors above

    In WP Admin however I can enable HPOS.

    Request: Please position the compatibility statement in a file that runs globally in WP. See for a similar issue, this bug report: https://github.com/woocommerce/woocommerce/issues/59036

    The statement is currently located in wp-content/plugins/users-customers-import-export-for-wp-woocommerce/users-customers-import-export-for-wp-woocommerce.php

    if (!defined('ABSPATH') || !is_admin()) {
    return;
    }

    [...]

    // HPOS compatibility decleration
    add_action( 'before_woocommerce_init', function() {
    if ( class_exists( \Automattic\WooCommerce\Utilities\FeaturesUtil::class ) ) {
    \Automattic\WooCommerce\Utilities\FeaturesUtil::declare_compatibility( 'custom_order_tables', __FILE__, true );
    }
    } );
Viewing 1 replies (of 1 total)
  • Plugin Support WebToffee Support

    (@webtoffeesupport)

    Hi @terragirl ,

    Thanks for reporting this and for taking the time to run the WP-CLI HPOS compatibility test. We really appreciate the detailed feedback.

    At the moment, the plugin does not include WP-CLI support, which is why it fails the CLI compatibility check. This is a known limitation on our side.

    In the meantime, you can work around this by temporarily disabling our plugin, enabling HPOS, and then reactivating the plugin once HPOS is enabled.

    WP-CLI compatibility is already on our roadmap, and once CLI support is introduced for the plugin in the future, this issue will be addressed as part of that work.

    Thanks again for bringing this to our attention, and please feel free to reach out if you have any other questions or suggestions.

Viewing 1 replies (of 1 total)

You must be logged in to reply to this topic.