Skip to content

Commit

Permalink
Declare compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
vyskoczilova committed Jul 24, 2023
1 parent e3b0b04 commit d15b644
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 4 deletions.
8 changes: 6 additions & 2 deletions README.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ Contributors: vyskoczilova, podpirate
Donate link: https://paypal.me/KarolinaVyskocilova
Tags: ecommerce, woocommerce, payment gateway, fee
Requires at least: 4.6
Tested up to: 6.0
Stable tag: 2.1.7
Tested up to: 6.2.0
Stable tag: 2.1.8
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html

Expand Down Expand Up @@ -105,6 +105,10 @@ Either post it on [GitHub](https://github.com/vyskoczilova/woocommerce-payforpay

== Changelog ==

= 2.1.8 (2023-07-24) =

* Declared HPOS support.

= 2.1.7 (2022-05-17) =

* Update: Add support for WOOCS converter.
Expand Down
11 changes: 9 additions & 2 deletions woocommerce-payforpayment.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
Plugin Name: Pay for Payment for WooCommerce
Plugin URI: https://kybernaut.cz/pluginy/woocommerce-pay-for-payment/
Description: Setup individual charges for each payment method in WooCommerce.
Version: 2.1.7
Version: 2.1.8
Author: Karolína Vyskočilová
Author URI: https://kybernaut.cz
License: GPL-2.0+
License URI: http://www.gnu.org/licenses/gpl-2.0.txt
Text Domain: woocommerce-pay-for-payment
Domain Path: /languages
WC requires at least: 2.6
WC tested up to: 6.5.1
WC tested up to: 8.0.0
*/

/**
Expand Down Expand Up @@ -61,3 +61,10 @@ function pay4payment_admin_notice() {
unset( $_GET['activate'] );
}
}

// Declare compatibility with HPOS.
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 );
}
} );

0 comments on commit d15b644

Please sign in to comment.