Skip to content

Commit

Permalink
Merge pull request #3 from dawit2123/main
Browse files Browse the repository at this point in the history
Fix: compatibility issue to the latest version of woocommerce
  • Loading branch information
isrugeek authored Aug 16, 2024
2 parents bb92169 + e1a0c3c commit 5e3d0e7
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions woo-chapa.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,18 @@ function waf_wc_chapa_init() {
add_filter( 'woocommerce_available_payment_gateways', 'conditionally_hide_waf_chapa_payment_gateways' );

}
add_action( 'before_woocommerce_init', 'waf_wc_chapa_before_init');
add_action( 'plugins_loaded', 'waf_wc_chapa_init' );

/**
* before woocommerce init
*/
function waf_wc_chapa_before_init() {
if ( class_exists( \Automattic\WooCommerce\Utilities\FeaturesUtil::class ) ) {
\Automattic\WooCommerce\Utilities\FeaturesUtil::declare_compatibility( 'custom_order_tables', __FILE__, true );
}
}


/**
* Add Settings link to the plugin entry in the plugins menu
Expand Down

0 comments on commit 5e3d0e7

Please sign in to comment.