Skip to content

Commit f8d3b28

Browse files
authored
Merge pull request #163 from itthinx/tested-3.4.1-6.7
Tested 3.4.1 6.7
2 parents e7e8f9a + 4f940fb commit f8d3b28

4 files changed

Lines changed: 29 additions & 4 deletions

File tree

changelog.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
== Groups by itthinx - changelog.txt
22

3+
2024-12-29 - version 3.4.1
4+
* Update - Declare WooCommerce HPOS compatibility.
5+
36
2024-12-26 - version 3.4.0
47
* Update - WordPress 6.7 compatible.
58
* Dev - Security validation WordPress.DB.PreparedSQL.InterpolatedNotPrepared

groups.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
* Plugin Name: Groups
2222
* Plugin URI: https://www.itthinx.com/plugins/groups
2323
* Description: Groups provides group-based user membership management, group-based capabilities and content access control.
24-
* Version: 3.4.0
24+
* Version: 3.4.1
2525
* Requires at least: 6.0
2626
* Requires PHP: 7.4
2727
* WC requires at least: 8.2
@@ -36,7 +36,7 @@
3636
if ( !defined( 'ABSPATH' ) ) {
3737
exit;
3838
}
39-
define( 'GROUPS_CORE_VERSION', '3.4.0' );
39+
define( 'GROUPS_CORE_VERSION', '3.4.1' );
4040
define( 'GROUPS_FILE', __FILE__ );
4141
if ( !defined( 'GROUPS_CORE_DIR' ) ) {
4242
define( 'GROUPS_CORE_DIR', untrailingslashit( plugin_dir_path( __FILE__ ) ) );

lib/extra/class-groups-extra.php

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,14 @@
2828
*/
2929
class Groups_Extra {
3030

31+
/**
32+
* Early actions.
33+
*/
34+
public static function boot() {
35+
add_action( 'init', array( __CLASS__, 'init' ) );
36+
add_action( 'before_woocommerce_init', array( __CLASS__, 'before_woocommerce_init' ) );
37+
}
38+
3139
/**
3240
* Registers actions, filters ...
3341
*/
@@ -47,6 +55,7 @@ public static function init() {
4755
*
4856
* @param boolean $visible
4957
* @param int $product_id
58+
*
5059
* @return boolean
5160
*/
5261
public static function woocommerce_product_is_visible( $visible, $product_id ) {
@@ -61,6 +70,7 @@ public static function woocommerce_product_is_visible( $visible, $product_id ) {
6170
*
6271
* @param string $where
6372
* @param int $post_id
73+
*
6474
* @return string
6575
*/
6676
public static function groups_comment_access_comment_count_where( $where, $post_id ) {
@@ -92,5 +102,17 @@ public static function groups_post_access_posts_where_query_get_post_types( $pos
92102
}
93103
return $post_types;
94104
}
105+
106+
/**
107+
* Declare WooCommerce feature compatibility.
108+
*
109+
* @since 3.4.1
110+
*/
111+
public static function before_woocommerce_init() {
112+
// HPOS
113+
if ( class_exists( \Automattic\WooCommerce\Utilities\FeaturesUtil::class ) ) {
114+
\Automattic\WooCommerce\Utilities\FeaturesUtil::declare_compatibility( 'custom_order_tables', GROUPS_FILE, true );
115+
}
116+
}
95117
}
96-
add_action( 'init', array( 'Groups_Extra', 'init' ) );
118+
Groups_Extra::boot();

readme.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Tags: groups, access, access control, member, membership
55
Requires at least: 6.0
66
Tested up to: 6.7
77
Requires PHP: 7.4
8-
Stable tag: 3.4.0
8+
Stable tag: 3.4.1
99
License: GPLv3
1010

1111
Groups is an efficient and powerful solution, providing group-based user membership management, group-based capabilities and content access control.

0 commit comments

Comments
 (0)