<?php
use Automattic\WooCommerce\Utilities\OrderUtil;

/**
	 * Determines whether HPOS is enabled.
	 *
	 * @return bool
	 */
if ( ! function_exists( 'ddfwm_is_hpos_enabled' ) ) {
	function ddfwm_is_hpos_enabled() : bool {
		if ( version_compare( get_option( 'woocommerce_version' ), '7.1.0' ) < 0 ) {
			return false;
		}

		if ( OrderUtil::custom_orders_table_usage_is_enabled() ) {
			return true;
		}

		return false;
	}
}

