diff --git a/facebook-for-woocommerce.php b/facebook-for-woocommerce.php index 73dd4dd1f..f7f5b22ef 100644 --- a/facebook-for-woocommerce.php +++ b/facebook-for-woocommerce.php @@ -21,8 +21,20 @@ * @package FacebookCommerce */ +use Automattic\WooCommerce\Utilities\FeaturesUtil; + defined( 'ABSPATH' ) || exit; +// HPOS compatibility declaration. +add_action( + 'before_woocommerce_init', + function() { + if ( class_exists( FeaturesUtil::class ) ) { + FeaturesUtil::declare_compatibility( 'custom_order_tables', plugin_basename( __FILE__ ), false ); + } + } +); + /** * The plugin loader class. *