Plugin Directory

Changeset 3036605


Ignore:
Timestamp:
02/15/2024 11:51:41 PM (2 years ago)
Author:
stuartduff
Message:

Added compatibility for HPOS

Location:
wc-external-product-new-tab/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • wc-external-product-new-tab/trunk/readme.txt

    r3036597 r3036605  
    44Requires at least: 6.1
    55Tested up to: 6.5
    6 Stable tag: 1.0.4
     6Stable tag: 1.0.5
    77License: GPLv3
    88License URI: https://www.gnu.org/licenses/gpl-3.0.html
     
    2727== Changelog ==
    2828
     29= 1.0.5 - 15/02/24 =
     30* Added - HPOS compatibility.
     31
    2932= 1.0.4 - 21/05/22 =
    3033* Added -  noopener noreferrer to external links.
  • wc-external-product-new-tab/trunk/wc-external-product-new-tab.php

    r3036597 r3036605  
    44 * Plugin URI:        https://wordpress.org/plugins/wc-external-product-new-tab
    55 * Description:       This plugin sets all external / affiliate product buy now links on a WooCommerce site to open in a new web browser tab.
    6  * Version:           1.0.4
     6 * Version:           1.0.5
    77 * Author:            Stuart Duff
    88 * Author URI:        http://stuartduff.com
     
    1212 * Domain Path: /languages/
    1313 * WC requires at least: 8.0
    14  * WC tested up to: 8.4
     14 * WC tested up to: 8.6
    1515 *
    1616 * @package WC_External_Product_New_Tab
     
    8080
    8181    add_action( 'init', array( $this, 'plugin_setup' ) );
     82
     83        // Declare HPOS compaibility.
     84        add_action( 'before_woocommerce_init', array( __CLASS__, 'wc_declare_hpos_compatibility' ) );
    8285
    8386  }
     
    220223  }
    221224
     225    /**
     226     * Declare HPOS compatibility.
     227     * @since   1.0.5
     228     * @return  void
     229     */
     230    public static function wc_declare_hpos_compatibility() {
     231        if ( class_exists( \Automattic\WooCommerce\Utilities\FeaturesUtil::class ) ) {
     232            \Automattic\WooCommerce\Utilities\FeaturesUtil::declare_compatibility( 'custom_order_tables', __FILE__, true );
     233        }
     234    }
     235
    222236} // End Class
Note: See TracChangeset for help on using the changeset viewer.