Skip to content
This repository has been archived by the owner on Feb 23, 2024. It is now read-only.

Commit

Permalink
Add compatibility with HPOS (custom order tables) for WooCommerce (#7347
Browse files Browse the repository at this point in the history
)
  • Loading branch information
alexflorisca authored Oct 10, 2022
1 parent 0e9888e commit 8851085
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion woocommerce-gutenberg-products-block.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,22 @@
* @package WooCommerce\Blocks
* @internal This file is only used when running as a feature plugin.
*/

defined( 'ABSPATH' ) || exit;

$minimum_wp_version = '6.0';

if ( ! defined( 'WC_BLOCKS_IS_FEATURE_PLUGIN' ) ) {
define( 'WC_BLOCKS_IS_FEATURE_PLUGIN', true );
}

// Declare comaptibility with custom order tables for WooCommerce
if ( class_exists( '\Automattic\WooCommerce\Utilities\FeaturesUtil' ) ) {
add_action('before_woocommerce_init', function() {
\Automattic\WooCommerce\Utilities\FeaturesUtil::declare_compatibility('custom_order_tables', __FILE__, true);
});
}

/**
* Whether notices must be displayed in the current page (plugins and WooCommerce pages).
*
Expand Down

0 comments on commit 8851085

Please sign in to comment.