Skip to content

Commit

Permalink
2.4
Browse files Browse the repository at this point in the history
  • Loading branch information
romi-getbowtied committed Dec 10, 2023
1 parent d9a52f7 commit fd2872a
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 11 deletions.
15 changes: 9 additions & 6 deletions README.txt
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
=== WooCommerce HookMeUp ===
Contributors: getbowtied
Tags: hooks, customize, theme, templates, woocommerce
Requires at least: 5.0
Tested up to: 6.2.2
Stable tag: 2.3
Requires PHP: 5.2.4
Requires at least: 6.0
Tested up to: 6.4
Stable tag: 2.4
Requires PHP: 7.4.1
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
WC requires at least: 5.0
WC tested up to: 7.9
WC requires at least: 7.0
WC tested up to: 8.3

== Description ==

Expand Down Expand Up @@ -143,6 +143,9 @@ WooCommerce HookMeUp doesn't include the full list of [WooCommerce Hooks](https:

== Changelog ==

= 2.4 =
- WooCommerce HPOS Compatibility

= 2.3 =
- Small maintenance updates

Expand Down
30 changes: 25 additions & 5 deletions hookmeup.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,17 @@
* Plugin Name: WooCommerce HookMeUp
* Plugin URI: https://wordpress.org/plugins/hookmeup/
* Description: Helps non-developers insert additional content, banners, shortcodes by exploiting key areas in any WooCommerce Theme, without altering the theme's code. Explore and use hidden places in pages like: Shop, Product Page, Cart, Checkout, Login, Register, My account, Thank You Page. Add banners, text, links, call to actions or anything you can think of in strategic spots on your site that you can't normally manipulate. No coding required.
* Version: 2.3
* Version: 2.4
* Author: Get Bowtied
* Author URI: https://www.getbowtied.com/
* License: GPL-2.0+
* License URI: http://www.gnu.org/licenses/gpl-2.0.txt
* Text Domain: hookmeup
* Domain Path: /languages
* Requires at least: 5.0
* Tested up to: 6.2.2
* WC requires at least: 5.0
* WC tested up to: 7.9
* Requires at least: 6.0
* Tested up to: 6.4
* WC requires at least: 7.0
* WC tested up to: 8.3
*
* @link getbowtied.com
* @since 1.0.0
Expand Down Expand Up @@ -91,6 +91,7 @@ public function __construct() {
$this->set_locale();
$this->define_public_hooks();
$this->define_customizer();
$this->HPOS_compatibility();
if( !get_option( 'hookmeup_done_import', false ) ) {
$done_import = $this->import_options();
if( $done_import ) {
Expand Down Expand Up @@ -242,6 +243,25 @@ private function define_customizer() {
$plugin_customizer = new HookMeUp_Customizer();
}

/**
* Register all of the hooks related to the customizer.
*
* @since 1.2
*
* @return void
*/
private function HPOS_compatibility() {

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

}

});
}

/**
* Display warning when WooCommerce not installed or activated
*
Expand Down

0 comments on commit fd2872a

Please sign in to comment.