Skip to content

Commit

Permalink
Merge pull request #167 from Codeinwp/bugfix/157
Browse files Browse the repository at this point in the history
Fixed compatibility issue with HPOS
  • Loading branch information
vytisbulkevicius authored Aug 31, 2023
2 parents 4fda08d + 5817336 commit 341ac72
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion woocommerce-product-addon.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
* Requires PHP: 7.2
*
* WC requires at least: 6.5
* WC tested up to: 7.4
* WC tested up to: 8.0
*
* WordPress Available: yes
* Requires License: no
Expand Down Expand Up @@ -121,5 +121,14 @@ function ( $compatibilities ) {
);
add_action( 'woocommerce_init', 'PPOM' );

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 );
}
}
);

register_activation_hook( __FILE__, array( 'NM_PersonalizedProduct', 'activate_plugin' ) );
register_deactivation_hook( __FILE__, array( 'NM_PersonalizedProduct', 'deactivate_plugin' ) );

0 comments on commit 341ac72

Please sign in to comment.