Skip to content

Commit

Permalink
Merge pull request #163 from itthinx/tested-3.4.1-6.7
Browse files Browse the repository at this point in the history
Tested 3.4.1 6.7
  • Loading branch information
itthinx authored Dec 29, 2024
2 parents e7e8f9a + 4f940fb commit f8d3b28
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 4 deletions.
3 changes: 3 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
== Groups by itthinx - changelog.txt

2024-12-29 - version 3.4.1
* Update - Declare WooCommerce HPOS compatibility.

2024-12-26 - version 3.4.0
* Update - WordPress 6.7 compatible.
* Dev - Security validation WordPress.DB.PreparedSQL.InterpolatedNotPrepared
Expand Down
4 changes: 2 additions & 2 deletions groups.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
* Plugin Name: Groups
* Plugin URI: https://www.itthinx.com/plugins/groups
* Description: Groups provides group-based user membership management, group-based capabilities and content access control.
* Version: 3.4.0
* Version: 3.4.1
* Requires at least: 6.0
* Requires PHP: 7.4
* WC requires at least: 8.2
Expand All @@ -36,7 +36,7 @@
if ( !defined( 'ABSPATH' ) ) {
exit;
}
define( 'GROUPS_CORE_VERSION', '3.4.0' );
define( 'GROUPS_CORE_VERSION', '3.4.1' );
define( 'GROUPS_FILE', __FILE__ );
if ( !defined( 'GROUPS_CORE_DIR' ) ) {
define( 'GROUPS_CORE_DIR', untrailingslashit( plugin_dir_path( __FILE__ ) ) );
Expand Down
24 changes: 23 additions & 1 deletion lib/extra/class-groups-extra.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,14 @@
*/
class Groups_Extra {

/**
* Early actions.
*/
public static function boot() {
add_action( 'init', array( __CLASS__, 'init' ) );
add_action( 'before_woocommerce_init', array( __CLASS__, 'before_woocommerce_init' ) );
}

/**
* Registers actions, filters ...
*/
Expand All @@ -47,6 +55,7 @@ public static function init() {
*
* @param boolean $visible
* @param int $product_id
*
* @return boolean
*/
public static function woocommerce_product_is_visible( $visible, $product_id ) {
Expand All @@ -61,6 +70,7 @@ public static function woocommerce_product_is_visible( $visible, $product_id ) {
*
* @param string $where
* @param int $post_id
*
* @return string
*/
public static function groups_comment_access_comment_count_where( $where, $post_id ) {
Expand Down Expand Up @@ -92,5 +102,17 @@ public static function groups_post_access_posts_where_query_get_post_types( $pos
}
return $post_types;
}

/**
* Declare WooCommerce feature compatibility.
*
* @since 3.4.1
*/
public static function before_woocommerce_init() {
// HPOS
if ( class_exists( \Automattic\WooCommerce\Utilities\FeaturesUtil::class ) ) {
\Automattic\WooCommerce\Utilities\FeaturesUtil::declare_compatibility( 'custom_order_tables', GROUPS_FILE, true );
}
}
}
add_action( 'init', array( 'Groups_Extra', 'init' ) );
Groups_Extra::boot();
2 changes: 1 addition & 1 deletion readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Tags: groups, access, access control, member, membership
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
Stable tag: 3.4.0
Stable tag: 3.4.1
License: GPLv3

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

0 comments on commit f8d3b28

Please sign in to comment.