Skip to content

Commit

Permalink
Declare support for HPOS
Browse files Browse the repository at this point in the history
  • Loading branch information
mattallan committed Aug 21, 2023
1 parent af2d8be commit 040e51b
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions wcs-importer-exporter.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,18 @@
require_once( 'woo-includes/woo-functions.php' );
}

/**
* Declare plugin compatibility with WooCommerce HPOS.
*/
add_action(
'before_woocommerce_init',
function() {
if ( class_exists( '\Automattic\WooCommerce\Utilities\FeaturesUtil' ) ) {
\Automattic\WooCommerce\Utilities\FeaturesUtil::declare_compatibility( 'custom_order_tables', __FILE__, true );
}
}
);

require_once( 'includes/wcsi-functions.php' );

class WCS_Importer_Exporter {
Expand Down

0 comments on commit 040e51b

Please sign in to comment.